diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2020-11-15 14:14:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 14:14:52 -0500 |
commit | d66a5e3b87912f7df0ac4b6dc1c2d2d127702d4f (patch) | |
tree | e23a24f08d4c2cee2a58ad70ba941e1e52ad2329 /ext/bg/js/settings/backup-controller.js | |
parent | 2e3169f68ced13f437982a67d468b6e18cfb6825 (diff) |
Fix settings resetting not initializing dictionary settings properly (#1036)
Diffstat (limited to 'ext/bg/js/settings/backup-controller.js')
-rw-r--r-- | ext/bg/js/settings/backup-controller.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/bg/js/settings/backup-controller.js b/ext/bg/js/settings/backup-controller.js index d5fa28bc..8f24bdb4 100644 --- a/ext/bg/js/settings/backup-controller.js +++ b/ext/bg/js/settings/backup-controller.js @@ -16,6 +16,7 @@ */ /* global + * DictionaryController * Modal * OptionsUtil * api @@ -383,6 +384,14 @@ class BackupController { // Get default options const optionsFull = this._optionsUtil.getDefault(); + // Update dictionaries + const dictionaries = await this._settingsController.getDictionaryInfo(); + for (const {options: {dictionaries: optionsDictionaries}} of optionsFull.profiles) { + for (const {title} of dictionaries) { + optionsDictionaries[title] = DictionaryController.createDefaultDictionarySettings(); + } + } + // Assign options try { await this._settingsImportSetOptionsFull(optionsFull); |