Skip to content

Commit

Permalink
Merge pull request #48216 from Expensify/marcaaron-fixSecondaryLoginB…
Browse files Browse the repository at this point in the history
…ackTo

Use optional chaining fo backTo on NewContactMethodPage

(cherry picked from commit fbc6720)

(CP triggered by mountiny)
  • Loading branch information
jasperhuangg authored and OSBotify committed Aug 29, 2024
1 parent 937156a commit 711de35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 711de35

Please sign in to comment.