aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/options.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/bg/js/options.js')
-rw-r--r--ext/bg/js/options.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/bg/js/options.js b/ext/bg/js/options.js
index fc2403e1..9dc0c166 100644
--- a/ext/bg/js/options.js
+++ b/ext/bg/js/options.js
@@ -432,7 +432,7 @@ class OptionsUtil {
update: this._updateVersion3.bind(this)
},
{
- async: false,
+ async: true,
update: this._updateVersion4.bind(this)
}
];
@@ -468,10 +468,11 @@ class OptionsUtil {
return options;
}
- static _updateVersion4(options) {
+ static async _updateVersion4(options) {
// Version 4 changes:
// Options conditions converted to string representations.
// Added usePopupWindow.
+ // Updated handlebars templates to include "clipboard-image" definition.
for (const {conditionGroups} of options.profiles) {
for (const {conditions} of conditionGroups) {
for (const condition of conditions) {
@@ -487,6 +488,7 @@ class OptionsUtil {
for (const {options: profileOptions} of options.profiles) {
profileOptions.general.usePopupWindow = false;
}
+ await this._addFieldTemplatesToOptions(options, '/bg/data/anki-field-templates-upgrade-v4.handlebars');
return options;
}
}