From 3b1d96330eda046edb4823008c785e21291ea154 Mon Sep 17 00:00:00 2001 From: war-in Date: Fri, 6 Sep 2024 10:58:09 +0200 Subject: [PATCH] add optional chaining when collecting netsuite config --- src/pages/workspace/accounting/utils.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/workspace/accounting/utils.tsx b/src/pages/workspace/accounting/utils.tsx index e6fc1b3d9624..ca4962c134ca 100644 --- a/src/pages/workspace/accounting/utils.tsx +++ b/src/pages/workspace/accounting/utils.tsx @@ -48,7 +48,7 @@ function getAccountingIntegrationData( canUseNetSuiteUSATax?: boolean, ): AccountingIntegration | undefined { const qboConfig = policy?.connections?.quickbooksOnline?.config; - const netsuiteConfig = policy?.connections?.netsuite?.options.config; + const netsuiteConfig = policy?.connections?.netsuite?.options?.config; const netsuiteSelectedSubsidiary = (policy?.connections?.netsuite?.options?.data?.subsidiaryList ?? []).find((subsidiary) => subsidiary.internalID === netsuiteConfig?.subsidiaryID); switch (connectionName) {