From f6b2435b98db8bcd3ae721e2fdb5333baaf103f3 Mon Sep 17 00:00:00 2001 From: andres Date: Wed, 19 Jul 2023 19:26:36 +0200 Subject: [PATCH] fix optional chaining --- src/modules/users/services/users.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/users/services/users.service.ts b/src/modules/users/services/users.service.ts index 7bc092a..8ce33ef 100644 --- a/src/modules/users/services/users.service.ts +++ b/src/modules/users/services/users.service.ts @@ -66,7 +66,7 @@ export class UsersService { passwordRecoveryToken: string }) { const htmlFinal = - html.replace('##token##', passwordRecoveryToken).replace('##name##', name) || + html?.replace('##token##', passwordRecoveryToken)?.replace('##name##', name) || `Hello ${name}!
To recover your password follow this link:
Confirm email. If it doesn't work, copy and paste the following link in your browser:
http://localhost:3000/confirm-email/${passwordRecoveryToken} ` try {