Skip to content

Commit

Permalink
Don't need to search if there is no dictionary entries
Browse files Browse the repository at this point in the history
  • Loading branch information
khaitruong922 committed Jul 13, 2024
1 parent 5b90d8e commit 284ac51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/js/display/display.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ export class Display extends EventDispatcher {

let {dictionaryEntries} = content;
if (!Array.isArray(dictionaryEntries)) {
dictionaryEntries = lookup && query.length > 0 ? await this._findDictionaryEntries(type === 'kanji', query, wildcardsEnabled, optionsContext) : [];
dictionaryEntries = hasEnabledDictionaries && lookup && query.length > 0 ? await this._findDictionaryEntries(type === 'kanji', query, wildcardsEnabled, optionsContext) : [];
if (this._setContentToken !== token) { return; }
content.dictionaryEntries = dictionaryEntries;
changeHistory = true;
Expand Down

0 comments on commit 284ac51

Please sign in to comment.