Skip to content

Commit

Permalink
Add function doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristipaval committed Apr 10, 2023
1 parent 7553807 commit 539fa78
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Str from 'expensify-common/lib/str';
import lodashGet from 'lodash/get';
import _ from 'underscore';
import React, {Component} from 'react';
import {View, ScrollView} from 'react-native';
import PropTypes from 'prop-types';
Expand Down Expand Up @@ -105,6 +106,9 @@ class ContactMethodDetailsPage extends Component {
return decodeURIComponent(lodashGet(this.props.route, 'params.contactMethod'));
}

/**
* Deletes the contact method if it has errors. Otherwise, it shows the confirmation alert and deletes it only if the user confirms.
*/
deleteContactMethod() {
if (!_.isEmpty(lodashGet(this.props.loginList, [this.getContactMethod(), 'errorFields'], {}))) {
User.deleteContactMethod(this.getContactMethod());
Expand Down

0 comments on commit 539fa78

Please sign in to comment.