diff options
Diffstat (limited to 'ext/js/templates/template-renderer.js')
-rw-r--r-- | ext/js/templates/template-renderer.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/js/templates/template-renderer.js b/ext/js/templates/template-renderer.js index 7bb93aa2..c5b7cd63 100644 --- a/ext/js/templates/template-renderer.js +++ b/ext/js/templates/template-renderer.js @@ -117,6 +117,8 @@ export class TemplateRenderer { let instance = cache.get(template); if (typeof instance === 'undefined') { this._updateCacheSize(this._cacheMaxSize - 1); + // Handlebars is a custom version of the library without type information, so it's assumed to be "any". + // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment instance = /** @type {import('handlebars').TemplateDelegate<import('anki-templates').NoteData>} */ (Handlebars.compileAST(template)); cache.set(template, instance); } |