From 468f6e45a744f6eba8df96ad7d5584963ba0770f Mon Sep 17 00:00:00 2001 From: DylanDylann Date: Wed, 6 Nov 2024 13:30:12 +0700 Subject: [PATCH] lint fix --- .../workspace/companyCards/addNew/BankConnection/index.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/workspace/companyCards/addNew/BankConnection/index.tsx b/src/pages/workspace/companyCards/addNew/BankConnection/index.tsx index 0a399a9473c8..f765647fe1fc 100644 --- a/src/pages/workspace/companyCards/addNew/BankConnection/index.tsx +++ b/src/pages/workspace/companyCards/addNew/BankConnection/index.tsx @@ -34,8 +34,8 @@ function BankConnection({policyID}: BankConnectionStepProps) { const workspaceAccountID = PolicyUtils.getWorkspaceAccountID(policyID ?? '-1'); const [cardFeeds] = useOnyx(`${ONYXKEYS.COLLECTION.SHARED_NVP_PRIVATE_DOMAIN_MEMBER}${workspaceAccountID}`); const bankKey = Object.keys(CONST.COMPANY_CARDS.BANKS).find((value) => CONST.COMPANY_CARDS.BANKS[value] === bankName); - const feedName = CONST.COMPANY_CARD.FEED_BANK_NAME[bankKey]; - const connectedBank = cardFeeds?.settings?.oAuthAccountDetails?.[feedName] ?? undefined; + const feedName = bankKey ? CONST.COMPANY_CARD.FEED_BANK_NAME?.[bankKey] : undefined; + const connectedBank = feedName ? cardFeeds?.settings?.oAuthAccountDetails?.[feedName] : undefined; const currentUrl = getCurrentUrl(); const isBankConnectionCompleteRoute = currentUrl.includes(ROUTES.BANK_CONNECTION_COMPLETE);