From 9f4a5a51a1ef1342f224705e37259452ec783679 Mon Sep 17 00:00:00 2001 From: Bernhard Owen Josephus Date: Thu, 26 Oct 2023 00:20:05 +0800 Subject: [PATCH] default to empty string --- 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);