Skip to content

Commit

Permalink
style
Browse files Browse the repository at this point in the history
  • Loading branch information
Gonals committed Feb 14, 2024
1 parent 4df6a65 commit 1380e65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,11 @@ function MoneyReportHeader({session, policy, chatReport, nextStep, report: money
const [isConfirmModalVisible, setIsConfirmModalVisible] = useState(false);

const cancelPayment = useCallback(() => {
if (chatReport) {
IOU.cancelPayment(moneyRequestReport, chatReport);
setIsConfirmModalVisible(false);
if (!chatReport) {
return;
}
IOU.cancelPayment(moneyRequestReport, chatReport);
setIsConfirmModalVisible(false);
}, [moneyRequestReport, chatReport]);

const isOnInstantSubmitPolicy = PolicyUtils.isInstantSubmitEnabled(policy);
Expand Down

0 comments on commit 1380e65

Please sign in to comment.