summaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/dictionary-controller.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-11-15 14:14:52 -0500
committerGitHub <noreply@github.com>2020-11-15 14:14:52 -0500
commitd66a5e3b87912f7df0ac4b6dc1c2d2d127702d4f (patch)
treee23a24f08d4c2cee2a58ad70ba941e1e52ad2329 /ext/bg/js/settings/dictionary-controller.js
parent2e3169f68ced13f437982a67d468b6e18cfb6825 (diff)
Fix settings resetting not initializing dictionary settings properly (#1036)
Diffstat (limited to 'ext/bg/js/settings/dictionary-controller.js')
-rw-r--r--ext/bg/js/settings/dictionary-controller.js14
1 files changed, 9 insertions, 5 deletions
diff --git a/ext/bg/js/settings/dictionary-controller.js b/ext/bg/js/settings/dictionary-controller.js
index 6c7e00b7..db3ebb22 100644
--- a/ext/bg/js/settings/dictionary-controller.js
+++ b/ext/bg/js/settings/dictionary-controller.js
@@ -489,11 +489,7 @@ class DictionaryController {
targets.push({
action: 'set',
path,
- value: {
- enabled: false,
- allowSecondarySearches: false,
- priority: 0
- }
+ value: DictionaryController.createDefaultDictionarySettings()
});
}
}
@@ -502,4 +498,12 @@ class DictionaryController {
await this._settingsController.modifyGlobalSettings(targets);
}
}
+
+ static createDefaultDictionarySettings() {
+ return {
+ enabled: false,
+ allowSecondarySearches: false,
+ priority: 0
+ };
+ }
}