From 284ac511a905da76c33e8856d3bbd66879a29a67 Mon Sep 17 00:00:00 2001 From: Khai Truong Date: Sun, 14 Jul 2024 00:19:45 +0700 Subject: [PATCH] Don't need to search if there is no dictionary entries --- ext/js/display/display.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/js/display/display.js b/ext/js/display/display.js index 913bd64153..b2f96e363c 100644 --- a/ext/js/display/display.js +++ b/ext/js/display/display.js @@ -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;