aboutsummaryrefslogtreecommitdiff
path: root/ext/js/data/options-util.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data/options-util.js')
-rw-r--r--ext/js/data/options-util.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js
index ca122e89..857ef630 100644
--- a/ext/js/data/options-util.js
+++ b/ext/js/data/options-util.js
@@ -459,7 +459,8 @@ class OptionsUtil {
{async: false, update: this._updateVersion7.bind(this)},
{async: true, update: this._updateVersion8.bind(this)},
{async: false, update: this._updateVersion9.bind(this)},
- {async: true, update: this._updateVersion10.bind(this)}
+ {async: true, update: this._updateVersion10.bind(this)},
+ {async: true, update: this._updateVersion11.bind(this)}
];
}
@@ -786,4 +787,17 @@ class OptionsUtil {
}
return options;
}
+
+ _updateVersion11(options) {
+ // Version 11 changes:
+ // Changed dictionaries to an array.
+ for (const profile of options.profiles) {
+ const dictionariesNew = [];
+ for (const [name, {priority, enabled, allowSecondarySearches, definitionsCollapsible}] of Object.entries(profile.options.dictionaries)) {
+ dictionariesNew.push({name, priority, enabled, allowSecondarySearches, definitionsCollapsible});
+ }
+ profile.options.dictionaries = dictionariesNew;
+ }
+ return options;
+ }
}