diff --git a/src/pages/workspace/WorkspacePageWithSections.js b/src/pages/workspace/WorkspacePageWithSections.js index 6d84ed2484a8..ab599bedbf04 100644 --- a/src/pages/workspace/WorkspacePageWithSections.js +++ b/src/pages/workspace/WorkspacePageWithSections.js @@ -88,7 +88,9 @@ class WorkspacePageWithSections extends React.Component { render() { const achState = lodashGet(this.props.reimbursementAccount, 'achData.state', ''); - const hasVBA = achState === BankAccount.STATE.OPEN; + const hasVBA = this.props.reimbursementAccount.loading + ? null + : achState === BankAccount.STATE.OPEN; const isUsingECard = lodashGet(this.props.user, 'isUsingExpensifyCard', false); const policyID = lodashGet(this.props.route, 'params.policyID'); const policyName = lodashGet(this.props.policy, 'name'); diff --git a/src/pages/workspace/reimburse/WorkspaceReimburseView.js b/src/pages/workspace/reimburse/WorkspaceReimburseView.js index 927401c46522..e04d20ff8cdc 100644 --- a/src/pages/workspace/reimburse/WorkspaceReimburseView.js +++ b/src/pages/workspace/reimburse/WorkspaceReimburseView.js @@ -27,8 +27,8 @@ const propTypes = { /** The policy ID currently being configured */ policyID: PropTypes.string.isRequired, - /** Does the user has a VBA into its account? */ - hasVBA: PropTypes.bool.isRequired, + /** Does the user have a VBA in their account? */ + hasVBA: PropTypes.bool, /** Policy values needed in the component */ policy: PropTypes.shape({ @@ -48,6 +48,10 @@ const propTypes = { ...withLocalizePropTypes, }; +const defaultProps = { + hasVBA: null, +}; + class WorkspaceReimburseView extends React.Component { constructor(props) { super(props); @@ -191,7 +195,7 @@ class WorkspaceReimburseView extends React.Component { - {!this.props.hasVBA && ( + {this.props.hasVBA === false && (