diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-29 22:31:41 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2023-11-29 22:31:41 -0500 |
commit | 176f3fcc57752cd65100e558801d8f5e4bd4e419 (patch) | |
tree | 38260f7b1c1a59bb7ba4558901311b0c0884f56c /ext/js | |
parent | 1c1c18f41296da657ac58a0583596a2cb1b4054e (diff) |
Fix bug
Diffstat (limited to 'ext/js')
-rw-r--r-- | ext/js/templates/sandbox/anki-template-renderer.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js index 9f4bf6ff..dbf395e9 100644 --- a/ext/js/templates/sandbox/anki-template-renderer.js +++ b/ext/js/templates/sandbox/anki-template-renderer.js @@ -668,9 +668,8 @@ export class AnkiTemplateRenderer { * @type {import('template-renderer').HelperFunction<string>} */ _formatGlossary(args, context, options) { - const [dictionary] = /** @type {[dictionary: string]} */ (args); + const [dictionary, content] = /** @type {[dictionary: string, content: import('dictionary-data').TermGlossary]} */ (args); const data = options.data.root; - const content = /** @type {import('dictionary-data').TermGlossary} */ (args[0]); if (typeof content === 'string') { return this._stringToMultiLineHtml(this._escape(content)); } if (!(typeof content === 'object' && content !== null)) { return ''; } switch (content.type) { |