From 6998ebeee2f68158428ee58de2e77fcf658e53ab Mon Sep 17 00:00:00 2001 From: Kuuuube <61125188+Kuuuube@users.noreply.github.com> Date: Tue, 21 May 2024 13:08:27 -0400 Subject: Remove No pitch accent data from pitch handlebars (#982) * Remove No pitch accent data from pitch handlebars * Update tests * Fix newline --- ext/js/data/options-util.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ext/js/data/options-util.js') diff --git a/ext/js/data/options-util.js b/ext/js/data/options-util.js index e2fd2789..2dc23229 100644 --- a/ext/js/data/options-util.js +++ b/ext/js/data/options-util.js @@ -543,7 +543,8 @@ export class OptionsUtil { this._updateVersion33, this._updateVersion34, this._updateVersion35, - this._updateVersion36 + this._updateVersion36, + this._updateVersion37 ]; /* eslint-enable @typescript-eslint/unbound-method */ if (typeof targetVersion === 'number' && targetVersion < result.length) { @@ -1295,6 +1296,14 @@ export class OptionsUtil { await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v36.handlebars'); } + /** + * - Removed `No pitch accent data` return from pitch handlebars when no data is found + * @type {import('options-util').UpdateFunction} + */ + async _updateVersion37(options) { + await this._applyAnkiFieldTemplatesPatch(options, '/data/templates/anki-field-templates-upgrade-v37.handlebars'); + } + /** * @param {string} url * @returns {Promise} -- cgit v1.2.3