From d6dc3be311373906a15df36e9df996b04b6786da Mon Sep 17 00:00:00 2001 From: Clement Zhang Date: Mon, 4 Nov 2024 17:53:50 +0100 Subject: [PATCH] addressing ellipsis bot PR comments --- .../apps/components/inputs/AppMultiSelectV2.svelte | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/src/lib/components/apps/components/inputs/AppMultiSelectV2.svelte b/frontend/src/lib/components/apps/components/inputs/AppMultiSelectV2.svelte index c72f341ac2..67847ee49c 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppMultiSelectV2.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppMultiSelectV2.svelte @@ -68,7 +68,10 @@ } return { label: item?.label ?? 'undefined', - value: item?.value != undefined ? JSON.stringify(item.value) : 'undefined' + value: + typeof item?.value === 'object' + ? JSON.stringify(item.value) + : item?.value ?? 'undefined' } }) } @@ -82,9 +85,7 @@ nvalue = [] } else { let rawNvalue = new Set( - resolvedConfig.defaultItems?.map((value) => { - return typeof value === 'string' ? value : `NOT_STRING` - }) + resolvedConfig.defaultItems?.filter((value) => typeof value === 'string') ) nvalue = items?.filter((item) => rawNvalue.has(item.value)) }