From 371ca2b512c47c1805282c814262ad3ed5eaebb1 Mon Sep 17 00:00:00 2001 From: Tangent Wantwight Date: Fri, 28 Jul 2023 18:49:43 -0400 Subject: [PATCH] Don't throw away vm in render --- 3x5.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/3x5.js b/3x5.js index 1e1dd67..355aa05 100644 --- a/3x5.js +++ b/3x5.js @@ -83,13 +83,11 @@ const display = document.createElement("blockquote"); const debugDisplay = document.createElement("pre"); function render() { - const html = renderCard( - { - mode: "render", - output: "", - }, - theCard.code - ); + const vm = { + mode: /** @type {ScriptType} */ ("render"), + output: "", + }; + const html = renderCard(vm, theCard.code); state.textContent = JSON.stringify(theCard, null, 2); display.innerHTML = html;