Skip to content

Commit

Permalink
Update src/libs/PolicyUtils.ts to selectedVendorID
Browse files Browse the repository at this point in the history
Co-authored-by: Vit Horacek <[email protected]>
  • Loading branch information
waterim and mountiny authored Nov 25, 2024
1 parent 970bbc6 commit 33806c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/PolicyUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ function findSelectedVendorWithDefaultSelect(vendors: NetSuiteVendor[] | undefin
}

function findSelectedSageVendorWithDefaultSelect(vendors: SageIntacctDataElementWithValue[] | SageIntacctDataElement[] | undefined, selectedVendorID: string | undefined) {
const selectedVendor = (vendors ?? []).find(({id}) => id === selectedVendorId);
const selectedVendor = (vendors ?? []).find(({id}) => id === selectedVendorID);
return selectedVendor ?? vendors?.[0] ?? undefined;
}

Expand Down

0 comments on commit 33806c3

Please sign in to comment.