1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-11 18:13:52 +02:00

fix: convert multiSelect prop value to [] if required (#4098)

This commit is contained in:
Paul Esch-Laurent 2022-11-01 17:38:02 -04:00 committed by GitHub
parent 7e10361033
commit 7b2269d06b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
}