add code to enable all dictionaries if all are disabled (workaround for
old options bug)
This commit is contained in:
parent
41624605f5
commit
0e8f00a68f
@ -172,6 +172,21 @@ function optionsVersion(options) {
|
||||
|
||||
fixupFields(options.anki.terms.fields);
|
||||
fixupFields(options.anki.kanji.fields);
|
||||
},
|
||||
() => {
|
||||
let hasEnabledDict = false;
|
||||
for (const title in options.dictionaries) {
|
||||
if (options.dictionaries[title].enabled) {
|
||||
hasEnabledDict = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!hasEnabledDict) {
|
||||
for (const title in options.dictionaries) {
|
||||
options.dictionaries[title].enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user