From a45be2e2112e770159d3971ab887f10aa872f822 Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Tue, 7 Nov 2023 22:11:09 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AF=8D=E4=BA=91bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/wordcloud/tokenizer.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/utils/wordcloud/tokenizer.js b/utils/wordcloud/tokenizer.js index 7ec06c3..5f8e7be 100644 --- a/utils/wordcloud/tokenizer.js +++ b/utils/wordcloud/tokenizer.js @@ -59,7 +59,10 @@ export class Tokenizer { } chats.push(...chatHistory) chats.sort(compareByTime) - seq = chatHistory[0].seq + seq = chatHistory?.[0]?.seq + if (!seq) { + break + } if (Config.debug) { logger.info(`拉取到${chatHistory.length}条聊天记录,当前已累计获取${chats.length}条聊天记录,继续拉...`) }