diff options
Diffstat (limited to 'ext/bg/js/translator.js')
-rw-r--r-- | ext/bg/js/translator.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ext/bg/js/translator.js b/ext/bg/js/translator.js index 40fa423b..1b2bd738 100644 --- a/ext/bg/js/translator.js +++ b/ext/bg/js/translator.js @@ -446,7 +446,7 @@ class Translator { this._addUniqueTermInfos(relatedDefinitions, termInfoMap); let secondaryDefinitions = await this._getMergedSecondarySearchResults(termInfoMap, secondarySearchDictionaryMap); - secondaryDefinitions = [unsequencedDefinitions, ...secondaryDefinitions]; + secondaryDefinitions = [...unsequencedDefinitions, ...secondaryDefinitions]; this._removeUsedDefinitions(secondaryDefinitions, termInfoMap, usedDefinitions); this._removeDuplicateDefinitions(secondaryDefinitions); @@ -721,9 +721,8 @@ class Translator { const results = []; for (let i = 0, ii = tagMetaList.length; i < ii; ++i) { const meta = tagMetaList[i]; - if (meta === null) { continue; } const name = names[i]; - const {category, notes, order, score, dictionary} = meta; + const {category, notes, order, score, dictionary} = (meta !== null ? meta : {dictionary: title}); const tag = this._createTag(name, category, notes, order, score, dictionary); results.push(tag); } |