Skip to content

Commit

Permalink
Merge pull request #28199 from waterim/fix-28182-App-crashes-when-inv…
Browse files Browse the repository at this point in the history
…alid-id-entered

Fix: App crashes when report ID is wrong bacause of the policy
  • Loading branch information
amyevans authored Sep 27, 2023
2 parents 085ecca + 511e86a commit f4829fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/iou/steps/MoneyRequestConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ export default compose(
// eslint-disable-next-line rulesdir/no-multiple-onyx-in-file
withOnyx({
policy: {
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${report.policyID}`,
key: ({report}) => `${ONYXKEYS.COLLECTION.POLICY}${report ? report.policyID : '0'}`,
},
}),
)(MoneyRequestConfirmPage);

0 comments on commit f4829fb

Please sign in to comment.