From eaf92672375d6b239f5f7e86c5c4dcefcccaab3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Ch=C3=A1vez?= Date: Wed, 25 Oct 2023 16:24:32 -0600 Subject: [PATCH] Merge pull request #30363 from bernhardoj/fix/29192-regression Fix crash when opening sign in modal as anonymous user (cherry picked from commit 348c010b440730c7e9271c48ba76832d9d61d0a9) --- src/pages/signin/LoginForm/BaseLoginForm.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/signin/LoginForm/BaseLoginForm.js b/src/pages/signin/LoginForm/BaseLoginForm.js index 9c597b73fc5c..5ce8739beb5f 100644 --- a/src/pages/signin/LoginForm/BaseLoginForm.js +++ b/src/pages/signin/LoginForm/BaseLoginForm.js @@ -95,7 +95,7 @@ const defaultProps = { function LoginForm(props) { const input = useRef(); - const [login, setLogin] = useState(() => Str.removeSMSDomain(props.credentials.login)); + const [login, setLogin] = useState(() => Str.removeSMSDomain(props.credentials.login || '')); const [formError, setFormError] = useState(false); const prevIsVisible = usePrevious(props.isVisible);