aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2017-03-12 09:18:40 -0700
committerAlex Yatskov <alex@foosoft.net>2017-03-12 09:18:40 -0700
commit94af149040679f3c6ba6d48583ec254b1fc3bbb1 (patch)
tree5b4b9f98667e54206873a6e5992ae6d2c40ebc8f /ext/bg/js
parente8a993bf35c6d87106ebe3d6c2487c0ef2d9636b (diff)
fix broken options on update1.1.4
Diffstat (limited to 'ext/bg/js')
-rw-r--r--ext/bg/js/util.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index d9bd76c5..59eb9269 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -191,6 +191,21 @@ function optionsVersion(options) {
options.dictionaries[title].enabled = true;
}
}
+ },
+ () => {
+ 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;
+ }
+ }
}
];