fix: trim undefined error

This commit is contained in:
ikechan8370 2023-08-25 14:51:16 +08:00 committed by GitHub
parent 246aaad987
commit d6ed1bf37f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1210,7 +1210,7 @@ export class chatgpt extends plugin {
let quotemessage = []
if (chatMessage?.quote) {
chatMessage.quote.forEach(function (item, index) {
if (item.text.trim() !== '') {
if (item.text && item.text.trim() !== '') {
quotemessage.push(item)
}
})