Skip to content

Commit

Permalink
Check if NetSuite options is not null
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberAndrii committed Aug 31, 2024
1 parent 84ed1a8 commit 7810fdc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function NetSuiteImportPage({policy}: WithPolicyConnectionsProps) {
const {canUseNetSuiteUSATax} = usePermissions();

const policyID = policy?.id ?? '-1';
const config = policy?.connections?.netsuite?.options.config;
const config = policy?.connections?.netsuite?.options?.config;
const {subsidiaryList} = policy?.connections?.netsuite?.options?.data ?? {};
const selectedSubsidiary = useMemo(() => (subsidiaryList ?? []).find((subsidiary) => subsidiary.internalID === config?.subsidiaryID), [subsidiaryList, config?.subsidiaryID]);

Expand Down

0 comments on commit 7810fdc

Please sign in to comment.