From 91e35b72eeab9c230d52ec8636faf1dc0f96554a Mon Sep 17 00:00:00 2001 From: Jakub Doka Date: Sat, 14 Dec 2024 15:33:11 +0100 Subject: [PATCH] Fixing the invalid code bricking the UI Signed-off-by: Jakub Doka --- depell/src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/depell/src/index.js b/depell/src/index.js index 8e7a7797..949a1624 100644 --- a/depell/src/index.js +++ b/depell/src/index.js @@ -336,10 +336,10 @@ async function fmt(target) { const instance = await getFmtInstance(); const decoder = new TextDecoder('utf-8'); const fmt = modifyCode(instance, code, 'fmt'); - if (typeof fmt !== "string") never() + if (typeof fmt !== "string") return; const codeBytes = new TextEncoder().encode(fmt); const tok = modifyCode(instance, fmt, 'tok'); - if (!(tok instanceof Uint8Array)) never(); + if (!(tok instanceof Uint8Array)) return; target.innerHTML = ''; let start = 0; let kind = tok[0];