diff --git a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js index b7a4118bc272..5cc03eb66d54 100644 --- a/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js +++ b/src/pages/settings/Profile/Contacts/ContactMethodDetailsPage.js @@ -109,10 +109,11 @@ class ContactMethodDetailsPage extends Component { componentDidMount() { const contactMethod = this.getContactMethod(); - const loginData = this.props.loginList[contactMethod]; - if (loginData) { - User.resetContactMethodValidateCodeSentState(contactMethod); + const loginData = lodashGet(this.props.loginList, contactMethod, {}); + if (_.isEmpty(loginData)) { + return; } + User.resetContactMethodValidateCodeSentState(this.getContactMethod()); } componentDidUpdate(prevProps) {