Skip to content

Commit

Permalink
add sort dictionary data to parse results on the search page
Browse files Browse the repository at this point in the history
this is based on forsakeninfinity's commit forsakeninfinity@c9887d5
  • Loading branch information
praschke committed Oct 13, 2023
1 parent 5701cb1 commit ae8d2bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ext/js/language/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ class Translator {
}

if (mode === 'simple') {
if (sortFrequencyDictionary !== null) {
const sortDictionaryMap = [sortFrequencyDictionary]
.filter(key => enabledDictionaryMap.has(key))

Check failure on line 98 in ext/js/language/translator.js

View workflow job for this annotation

GitHub Actions / test

Expected parentheses around arrow function argument
.reduce((subMap, key) => subMap.set(key, enabledDictionaryMap.get(key)), new Map());
await this._addTermMeta(dictionaryEntries, sortDictionaryMap);
}
this._clearTermTags(dictionaryEntries);
} else {
await this._addTermMeta(dictionaryEntries, enabledDictionaryMap);
Expand Down

0 comments on commit ae8d2bb

Please sign in to comment.