From 176f3fcc57752cd65100e558801d8f5e4bd4e419 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Wed, 29 Nov 2023 22:31:41 -0500 Subject: Fix bug --- ext/js/templates/sandbox/anki-template-renderer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/js/templates') 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} */ _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) { -- cgit v1.2.3