From 970bbc6296a32b826c18203de04930de04a6cd08 Mon Sep 17 00:00:00 2001 From: Artem Makushov <39777589+waterim@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:40:28 +0100 Subject: [PATCH] Update src/libs/PolicyUtils.ts to selectedVendorID Co-authored-by: Vit Horacek <36083550+mountiny@users.noreply.github.com> --- src/libs/PolicyUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index c11eb2f0397e..4fcd887af8fd 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -712,7 +712,7 @@ function findSelectedVendorWithDefaultSelect(vendors: NetSuiteVendor[] | undefin return selectedVendor ?? vendors?.[0] ?? undefined; } -function findSelectedSageVendorWithDefaultSelect(vendors: SageIntacctDataElementWithValue[] | SageIntacctDataElement[] | undefined, selectedVendorId: string | undefined) { +function findSelectedSageVendorWithDefaultSelect(vendors: SageIntacctDataElementWithValue[] | SageIntacctDataElement[] | undefined, selectedVendorID: string | undefined) { const selectedVendor = (vendors ?? []).find(({id}) => id === selectedVendorId); return selectedVendor ?? vendors?.[0] ?? undefined; }