diff --git a/webapp/src/viewModel/boardTree.ts b/webapp/src/viewModel/boardTree.ts index b2f279b9f..0ccd86d55 100644 --- a/webapp/src/viewModel/boardTree.ts +++ b/webapp/src/viewModel/boardTree.ts @@ -200,10 +200,18 @@ class MutableBoardTree implements BoardTree { return cards.filter((card: Card) => { const searchTextInCardTitle: boolean = card.title?.toLocaleLowerCase().includes(searchText) - const searchTextInProperties: boolean = Object.values(card.properties). - map((el: string) => el.toLowerCase().includes(searchText)). - some((el: boolean) => el) - return searchTextInCardTitle || searchTextInProperties + if (searchTextInCardTitle) { + return true + } + for (const property in card.properties) { + if ( + Object.prototype.hasOwnProperty.call(card.properties, property) && + card.properties[property].toLowerCase().includes(searchText) + ) { + return true + } + } + return false }) }