mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-17 22:43:42 +08:00
fix jest error
This commit is contained in:
@@ -739,6 +739,7 @@ export const useChatStore = createPersistStore(
|
||||
if (typeof message !== "string") {
|
||||
return false;
|
||||
}
|
||||
message = message.trim();
|
||||
if (message.startsWith("```") && message.endsWith("```")) {
|
||||
const codeBlockContent = message.slice(3, -3).trim();
|
||||
const jsonString = codeBlockContent.replace(/^json\s*/i, '').trim();
|
||||
|
||||
Reference in New Issue
Block a user