Skip to content

Commit

Permalink
Merge pull request #56600 from software-mansion-labs/kicu/56519-fix-f…
Browse files Browse the repository at this point in the history
…ilter-cards

Do not return empty card Objects for AdvancedFilters

(cherry picked from commit f7ce0aa)

(CP triggered by Julesssss)
  • Loading branch information
Julesssss authored and OSBotify committed Feb 11, 2025
1 parent 93e8e34 commit f3d8969
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/libs/CardUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,12 @@ function isCardHiddenFromSearch(card: Card) {

function mergeCardListWithWorkspaceFeeds(workspaceFeeds: Record<string, WorkspaceCardsList | undefined>, cardList = allCards, shouldExcludeCardHiddenFromSearch = false) {
const feedCards: CardList = {};
Object.keys(cardList).forEach((cardKey) => {
const card = cardList[cardKey];
if (shouldExcludeCardHiddenFromSearch && isCardHiddenFromSearch(card)) {
Object.values(cardList).forEach((card) => {
if (!isCard(card) || (shouldExcludeCardHiddenFromSearch && isCardHiddenFromSearch(card))) {
return;
}

feedCards[cardKey] = card;
feedCards[card.cardID] = card;
});

Object.values(workspaceFeeds ?? {}).forEach((currentCardFeed) => {
Expand Down

0 comments on commit f3d8969

Please sign in to comment.