From 47236246a57c40ff784315c47d38ddfecce6fe84 Mon Sep 17 00:00:00 2001 From: Serge Alex Date: Sun, 1 Nov 2026 06:34:05 +0300 Subject: [PATCH] fix-parser-b64-try-catch --- content/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/parser.js b/content/parser.js index b703f42..487df69 100644 --- a/content/parser.js +++ b/content/parser.js @@ -59,7 +59,7 @@ function parseOne(text, startIdx) { const closeIdx = text.indexOf(CLOSE_B64, startIdx + OPEN_B64.length); if (closeIdx < 0) return null; const raw = text.slice(startIdx + OPEN_B64.length, closeIdx); - const json = b64DecodeUtf8(raw); + let json = null; try { json = b64DecodeUtf8(raw); } catch (e) { return null; } const obj = tryParseJson(json); if (!obj || typeof obj !== 'object' || !obj.tool) return null; return { call: obj, nextIdx: closeIdx + CLOSE_B64.length };