From 8ec88ffc25bc14794a91eb87dc657bfc5452e158 Mon Sep 17 00:00:00 2001 From: Artem Makushov Date: Tue, 26 Sep 2023 01:02:24 +0200 Subject: [PATCH] fix policy when report is wrong --- src/pages/iou/steps/MoneyRequestConfirmPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/iou/steps/MoneyRequestConfirmPage.js b/src/pages/iou/steps/MoneyRequestConfirmPage.js index 015707db71f2..5a75caac37a6 100644 --- a/src/pages/iou/steps/MoneyRequestConfirmPage.js +++ b/src/pages/iou/steps/MoneyRequestConfirmPage.js @@ -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?.policyID}`, }, }), )(MoneyRequestConfirmPage);