fix broken options on update
This commit is contained in:
parent
e8a993bf35
commit
94af149040
@ -186,6 +186,21 @@ function optionsVersion(options) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!hasEnabledDict) {
|
||||||
|
for (const title in options.dictionaries) {
|
||||||
|
options.dictionaries[title].enabled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
let hasEnabledDict = false;
|
||||||
|
for (const title in options.dictionaries) {
|
||||||
|
if (options.dictionaries[title].enabled) {
|
||||||
|
hasEnabledDict = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!hasEnabledDict) {
|
if (!hasEnabledDict) {
|
||||||
for (const title in options.dictionaries) {
|
for (const title in options.dictionaries) {
|
||||||
options.dictionaries[title].enabled = true;
|
options.dictionaries[title].enabled = true;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"name": "Yomichan",
|
"name": "Yomichan",
|
||||||
"version": "1.1.3",
|
"version": "1.1.4",
|
||||||
|
|
||||||
"description": "Japanese dictionary with Anki integration",
|
"description": "Japanese dictionary with Anki integration",
|
||||||
"icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"},
|
"icons": {"16": "mixed/img/icon16.png", "48": "mixed/img/icon48.png", "128": "mixed/img/icon128.png"},
|
||||||
|
Loading…
Reference in New Issue
Block a user