From 195376981b1dc806b7c52ce02beb007b7af6905f Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Thu, 14 Dec 2023 21:10:55 +0700 Subject: [PATCH] fix remove redundant code --- .../settings/Profile/Contacts/ContactMethodDetailsPage.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js index e1cbf5989a35..e3aee93a6911 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js @@ -126,14 +126,13 @@ class ContactMethodDetailsPage extends Component { const loginData = lodashGet(this.props.loginList, contactMethod, {}); const isDefaultContactMethod = this.props.session.email === loginData.partnerUserID; - const shouldSignOut = isDefaultContactMethod; // Navigate to methods page on successful magic code verification // validatedDate property is responsible to decide the status of the magic code verification if (!prevValidatedDate && validatedDate) { // If the selected contactMethod is the current session['login'] and the account is unvalidated, // the current authToken is invalid after the successful magic code verification. // So we need to sign out the user and redirect to the sign in page. - if (shouldSignOut) { + if (isDefaultContactMethod) { Session.signOutAndRedirectToSignIn(); return; }