summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-29 22:31:41 -0500
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2023-11-29 22:31:41 -0500
commit176f3fcc57752cd65100e558801d8f5e4bd4e419 (patch)
tree38260f7b1c1a59bb7ba4558901311b0c0884f56c
parent1c1c18f41296da657ac58a0583596a2cb1b4054e (diff)
Fix bug
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js3
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) {