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 };