Skip to content

Commit

Permalink
fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jasperhuangg committed Aug 17, 2023
1 parent 1bd90c9 commit 43daa6d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/iou/steps/MoneyRequestConfirmPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,10 @@ function MoneyRequestConfirmPage(props) {

useEffect(() => {
const policyExpenseChat = _.find(participants, (participant) => participant.isPolicyExpenseChat);
const policyID = policyExpenseChat.policyID;
if (policyExpenseChat) {
Policy.openDraftWorkspaceRequest(policyID);
Policy.openDraftWorkspaceRequest(policyExpenseChat.policyID);
}
}, [props.report, participants]);
});

useEffect(() => {
// ID in Onyx could change by initiating a new request in a separate browser tab or completing a request
Expand Down

0 comments on commit 43daa6d

Please sign in to comment.