From 94af149040679f3c6ba6d48583ec254b1fc3bbb1 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sun, 12 Mar 2017 09:18:40 -0700 Subject: fix broken options on update --- ext/bg/js/util.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'ext/bg') 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 @@ -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) { for (const title in options.dictionaries) { options.dictionaries[title].enabled = true; -- cgit v1.2.3