From 0506cfbee5443635ebd6ac79054b85f171775039 Mon Sep 17 00:00:00 2001 From: praschke Date: Tue, 17 Oct 2023 21:21:30 +0100 Subject: initial handlebars patch --- ext/data/templates/anki-field-templates-upgrade-v21.handlebars | 0 ext/js/data/options-util.js | 8 +++++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 ext/data/templates/anki-field-templates-upgrade-v21.handlebars (limited to 'ext') diff --git a/ext/data/templates/anki-field-templates-upgrade-v21.handlebars b/ext/data/templates/anki-field-templates-upgrade-v21.handlebars new file mode 100644 index 00000000..e69de29b diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index 2674701f..7b050416 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -470,7 +470,8 @@ class OptionsUtil { {async: false, update: this._updateVersion17.bind(this)}, {async: false, update: this._updateVersion18.bind(this)}, {async: false, update: this._updateVersion19.bind(this)}, - {async: false, update: this._updateVersion20.bind(this)} + {async: false, update: this._updateVersion20.bind(this)}, + {async: true, update: this._updateVersion21.bind(this)} ]; if (typeof targetVersion === 'number' && targetVersion < result.length) { result.splice(targetVersion); @@ -997,4 +998,9 @@ class OptionsUtil { } return options; } + + async _updateVersion21(options) { + await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v21.handlebars'); + return options; + } } -- cgit v1.2.3