From 7b2269d06b5d6e856038cd0e26b4f5b58eae5df5 Mon Sep 17 00:00:00 2001 From: Paul Esch-Laurent Date: Tue, 1 Nov 2022 17:38:02 -0400 Subject: [PATCH] fix: convert `multiSelect` prop value to [] if required (#4098) --- webapp/src/store/cards.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webapp/src/store/cards.ts b/webapp/src/store/cards.ts index 4edd32f53..017c91362 100644 --- a/webapp/src/store/cards.ts +++ b/webapp/src/store/cards.ts @@ -354,7 +354,7 @@ function searchFilterCards(cards: Card[], board: Board, searchTextRaw: string): } } else if (propertyTemplate.type === 'multiSelect') { // Look up the value of the select option - const options = (propertyValue as string[]).map((value) => propertyTemplate.options.find((o) => o.id === value)?.value.toLowerCase()) + const options = (Array.isArray(propertyValue) ? propertyValue : [propertyValue]).map((value) => propertyTemplate.options.find((o) => o.id === value)?.value.toLowerCase()) if (options?.includes(searchText)) { return true }