diff --git a/ext/js/pages/settings/dictionary-import-controller.js b/ext/js/pages/settings/dictionary-import-controller.js index 254c67518b..b7e2707a7a 100644 --- a/ext/js/pages/settings/dictionary-import-controller.js +++ b/ext/js/pages/settings/dictionary-import-controller.js @@ -171,7 +171,10 @@ export class DictionaryImportController { if (!(language in recommendedDictionaries)) { for (const {element} of recommendedDictionaryCategories) { - element.hidden = true; + const dictionaryCategoryParent = element.parentElement; + if (dictionaryCategoryParent) { + dictionaryCategoryParent.hidden = true; + } } return; }