From b3fb004232cb76a19c2daa3c3e39984084a0b9b1 Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Tue, 13 Dec 2022 15:49:58 +0800 Subject: [PATCH] fix(ui): forget pwd should be enabled correctly --- packages/ui/src/hooks/use-sie.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/hooks/use-sie.ts b/packages/ui/src/hooks/use-sie.ts index 683524c6e..525b27267 100644 --- a/packages/ui/src/hooks/use-sie.ts +++ b/packages/ui/src/hooks/use-sie.ts @@ -25,7 +25,9 @@ export const useForgotPasswordSettings = () => { const { forgotPassword } = experienceSettings ?? {}; return { - isForgotPasswordEnabled: Boolean(forgotPassword?.email ?? forgotPassword?.sms), + isForgotPasswordEnabled: Boolean( + forgotPassword && (forgotPassword.email || forgotPassword.sms) + ), ...forgotPassword, }; };