Skip to content

Commit

Permalink
Merge pull request #53864 from mkzie2/mkzie2-issue/53819
Browse files Browse the repository at this point in the history
Fix unverified contact method is displayed
  • Loading branch information
luacmartins authored Dec 10, 2024
2 parents b5d7962 + 3099f08 commit 03f19c1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/pages/settings/Profile/Contacts/NewContactMethodPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import ROUTES from '@src/ROUTES';
import type SCREENS from '@src/SCREENS';
import INPUT_IDS from '@src/types/form/NewContactMethodForm';
import type {Errors} from '@src/types/onyx/OnyxCommon';
import {isEmptyObject} from '@src/types/utils/EmptyObject';

type NewContactMethodPageProps = PlatformStackScreenProps<SettingsNavigatorParamList, typeof SCREENS.SETTINGS.PROFILE.NEW_CONTACT_METHOD>;

Expand Down Expand Up @@ -163,7 +162,7 @@ function NewContactMethodPage({route}: NewContactMethodPageProps) {
User.clearContactMethodErrors(addSMSDomainIfPhoneNumber(pendingContactAction?.contactMethod ?? contactMethod), 'addedLogin');
}}
onClose={() => {
if (!isEmptyObject(loginData?.errorFields) && pendingContactAction?.contactMethod) {
if (pendingContactAction?.contactMethod) {
User.clearContactMethod(pendingContactAction?.contactMethod);
User.clearUnvalidatedNewContactMethodAction();
}
Expand Down

0 comments on commit 03f19c1

Please sign in to comment.