From 2a53f99dd50695768ff9b625665ca69bf0bec4c1 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Tue, 24 Sep 2024 17:53:31 +0200 Subject: [PATCH] Fix: correctly apply previous refactoring --- src/Logic/Search/LayerSearch.ts | 2 +- src/Logic/Search/ThemeSearch.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Logic/Search/LayerSearch.ts b/src/Logic/Search/LayerSearch.ts index 02a58d5b8..9b5545700 100644 --- a/src/Logic/Search/LayerSearch.ts +++ b/src/Logic/Search/LayerSearch.ts @@ -39,7 +39,7 @@ export default class LayerSearch { if (query.length < 1) { return [] } - const scores = LayerSearch.scoreLayers(query, this._layerWhitelist) + const scores = LayerSearch.scoreLayers(query, { whitelist: this._layerWhitelist }) const asList: ({ layer: LayerConfig, score: number })[] = [] for (const layer in scores) { asList.push({ diff --git a/src/Logic/Search/ThemeSearch.ts b/src/Logic/Search/ThemeSearch.ts index 218a7ad63..ed5502e7e 100644 --- a/src/Logic/Search/ThemeSearch.ts +++ b/src/Logic/Search/ThemeSearch.ts @@ -109,7 +109,7 @@ export default class ThemeSearch { let options : {blacklist: Set} = undefined if(ignoreLayers?.length > 0){ - options.blacklist = new Set(ignoreLayers) + options = { blacklist: new Set(ignoreLayers) } } const layerScores = query.length < 3 ? {} : LayerSearch.scoreLayers(query, options) const results: Record = {}