fix optional chaining

This commit is contained in:
andres
2023-07-19 19:26:36 +02:00
parent dc01065792
commit f6b2435b98

View File

@@ -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) ||
`<b>Hello ${name}!</b><br/>To recover your password follow this link:<br/><a href="http://localhost:3000/confirm-email/${passwordRecoveryToken}">Confirm email</a>. If it doesn't work, copy and paste the following link in your browser:<br/>http://localhost:3000/confirm-email/${passwordRecoveryToken} `
try {