From 71bc005fef3f8d09fcb005fb1d0af15133fbbc9d Mon Sep 17 00:00:00 2001 From: MarvNC Date: Sun, 13 Oct 2024 12:20:13 -0700 Subject: [PATCH] Fix Visible Recommended Dictionary Headers --- ext/js/pages/settings/dictionary-import-controller.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js index 15bc4b908f..f2e0623550 100644 --- a/ext/js/pages/settings/dictionary-import-controller.js +++ b/ext/js/pages/settings/dictionary-import-controller.js @@ -208,6 +208,10 @@ export class DictionaryImportController { _renderRecommendedDictionaryGroup(recommendedDictionaries, dictionariesList, installedDictionaryNames, installedDictionaryDownloadUrls) { const dictionariesListParent = dictionariesList.parentElement; dictionariesList.innerHTML = ''; + // Hide section if no dictionaries are available + if (dictionariesListParent) { + dictionariesListParent.hidden = recommendedDictionaries.length === 0; + } for (const dictionary of recommendedDictionaries) { if (dictionariesList) { if (dictionariesListParent) {