Skip to content

Commit 887cb05

Browse files
committed
Fix null guard for deleted bank accounts in hasPersonalBankAccount check
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
1 parent 32319ed commit 887cb05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/hooks/usePaymentOptions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ function usePaymentOptions({
115115
const isInvoiceReport = (!isEmptyObject(iouReport) && isInvoiceReportUtil(iouReport)) || false;
116116
const shouldShowPayWithExpensifyOption = !shouldHidePaymentOptions;
117117
const shouldShowPayElsewhereOption = !shouldHidePaymentOptions && !isInvoiceReport;
118-
const hasPersonalBankAccount = Object.values(bankAccountList).some((account) => account.accountData?.type === CONST.BANK_ACCOUNT.TYPE.PERSONAL);
118+
const hasPersonalBankAccount = Object.values(bankAccountList).some((account) => account?.accountData?.type === CONST.BANK_ACCOUNT.TYPE.PERSONAL);
119119
const paymentButtonOptions = useMemo(() => {
120120
const buttonOptions = [];
121121
const isExpenseReport = isExpenseReportUtil(iouReport);

0 commit comments

Comments
 (0)