add code to enable all dictionaries if all are disabled (workaround for

old options bug)
This commit is contained in:
Alex Yatskov 2017-03-05 11:39:07 -08:00
parent 41624605f5
commit 0e8f00a68f

View File

@ -172,6 +172,21 @@ function optionsVersion(options) {
fixupFields(options.anki.terms.fields); fixupFields(options.anki.terms.fields);
fixupFields(options.anki.kanji.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;
}
}
} }
]; ];