From 0289b700e14507b2442d41fb4c07ad5114d421fd Mon Sep 17 00:00:00 2001 From: Stefan Vukovic Date: Sat, 6 Jan 2024 21:50:35 +0100 Subject: [PATCH] fix ts --- ext/js/language/translator.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index 5067749904..5441294b06 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -266,12 +266,11 @@ export class Translator { } const {matchType} = options; - const databaseEntries = await this._database.findTermsBulk(uniqueDeinflectionTerms, enabledDictionaryMap, matchType); for (const databaseEntry of databaseEntries) { - const entryDictionary = enabledDictionaryMap.get(databaseEntry.dictionary); - const partsOfSpeechFilter = entryDictionary?.partsOfSpeechFilter ?? true; + const entryDictionary = /** @type {import('translation').FindTermDictionary} */ (enabledDictionaryMap.get(databaseEntry.dictionary)); + const partsOfSpeechFilter = entryDictionary.partsOfSpeechFilter; const definitionRules = Deinflector.rulesToRuleFlags(databaseEntry.rules); for (const deinflection of uniqueDeinflectionArrays[databaseEntry.index]) {