diff --git a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx index 945a1155c528..3380766d0ecf 100644 --- a/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx +++ b/src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx @@ -47,9 +47,9 @@ function NewContactMethodPage({loginList, route}: NewContactMethodPageProps) { const validateIfnumber = LoginUtils.validateNumber(phoneLogin); const submitDetail = (validateIfnumber || values.phoneOrEmail).trim().toLowerCase(); - User.addNewContactMethodAndNavigate(submitDetail, route.params.backTo); + User.addNewContactMethodAndNavigate(submitDetail, route.params?.backTo); }, - [route.params.backTo], + [route.params?.backTo], ); const validate = React.useCallback(