Skip to content

Commit 95b30f0

Browse files
committed
Don't add dictionary to collapsible dictionary settings if it contains no term entries and no kanji entries
<rikaitan.link>ZDM3MDVkMzI0YTY0YTBlZTE4ZDE2ZTc5NWExNTI0MDNhZDI1NGZiMQo=</rikaitan.link>
1 parent 6099b14 commit 95b30f0

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ext/js/pages/settings/collapsible-dictionary-controller.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export class CollapsibleDictionaryController {
8383
for (let i = 0, ii = dictionaries.length; i < ii; ++i) {
8484
const {name} = dictionaries[i];
8585
const dictionaryInfo = this._dictionaryInfoMap.get(name);
86+
if (!dictionaryInfo?.counts?.terms?.total && !dictionaryInfo?.counts?.kanji?.total) {
87+
continue;
88+
}
8689
if (typeof dictionaryInfo === 'undefined') { continue; }
8790

8891
const select = this._addSelect(fragment, name, `rev.${dictionaryInfo.revision}`);

0 commit comments

Comments
 (0)