filter out no match.

Signed-off-by: Akos Kitta <kittaakos@typefox.io>
This commit is contained in:
Akos Kitta 2020-07-22 11:45:32 +02:00
parent 8aa08cbf6e
commit 01c21266e5

View File

@ -195,7 +195,12 @@ export class BoardsServiceClientImpl implements BoardsServiceClient, FrontendApp
return compareAnything(leftLabel, rightLabel, lookFor);
}
const normalizedQuery = query.toLowerCase();
return boards.filter(coresFilter).map(toMatch).sort((left, right) => compareEntries(left, right, normalizedQuery)).map(({ board }) => board);
return boards
.filter(coresFilter)
.map(toMatch)
.filter(({ matches }) => !!matches)
.sort((left, right) => compareEntries(left, right, normalizedQuery))
.map(({ board }) => board);
}
get boardsConfig(): BoardsConfig.Config {