Skip to content

Commit

Permalink
add errorutils
Browse files Browse the repository at this point in the history
  • Loading branch information
luacmartins committed Sep 14, 2022
1 parent dd75b94 commit ab9fb29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/ReimbursementAccount/ReimbursementAccountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import FormAlertWithSubmitButton from '../../components/FormAlertWithSubmitButto
import CONST from '../../CONST';
import FormScrollView from '../../components/FormScrollView';
import * as BankAccounts from '../../libs/actions/BankAccounts';
import * as ErrorUtils from '../../libs/ErrorUtils';

const propTypes = {
/** Data for the bank account actively being set up */
Expand Down Expand Up @@ -58,7 +59,7 @@ class ReimbursementAccountForm extends React.Component {
onFixTheErrorsLinkPressed={() => {
this.form.scrollTo({y: 0, animated: true});
}}
message={this.props.reimbursementAccount.error || _.values(this.props.reimbursementAccount.errors)[0]}
message={this.props.reimbursementAccount.error || ErrorUtils.getLastestErrorMessage(this.props.reimbursementAccount.errors)}
isMessageHtml={this.props.reimbursementAccount.isErrorHtml}
isLoading={this.props.reimbursementAccount.loading || this.props.reimbursementAccount.isLoading}
/>
Expand Down

0 comments on commit ab9fb29

Please sign in to comment.