fix: JSON parse error (maybe)

This commit is contained in:
ikechan8370 2023-01-10 20:36:20 +08:00 committed by GitHub
parent 461437f747
commit fc715e302e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -697,7 +697,12 @@ export async function browserPostEventStream (
conversationResponse
})
}
try {
const checkJson = JSON.parse(data)
} catch (error) {
console.log('warning: parse error.')
return
}
try {
const convoResponseEvent =
JSON.parse(data)