diff --git a/static/js/chat.js b/static/js/chat.js index 96e2a29..0c7720a 100644 --- a/static/js/chat.js +++ b/static/js/chat.js @@ -281,7 +281,7 @@ if (!only || only === "text") { let text = this.#text; - if (this.#tags.includes("json")) { + if (text && this.#tags.includes("json")) { text = `\`\`\`json\n${text}\n\`\`\``; }