fix: 词云bug

This commit is contained in:
ikechan8370 2023-11-07 22:11:09 +08:00
parent 0d8ef840d4
commit a45be2e211

View file

@ -59,7 +59,10 @@ export class Tokenizer {
} }
chats.push(...chatHistory) chats.push(...chatHistory)
chats.sort(compareByTime) chats.sort(compareByTime)
seq = chatHistory[0].seq seq = chatHistory?.[0]?.seq
if (!seq) {
break
}
if (Config.debug) { if (Config.debug) {
logger.info(`拉取到${chatHistory.length}条聊天记录,当前已累计获取${chats.length}条聊天记录,继续拉...`) logger.info(`拉取到${chatHistory.length}条聊天记录,当前已累计获取${chats.length}条聊天记录,继续拉...`)
} }