fix: 修复 CodeQL code scanning warning 问题

This commit is contained in:
hicccc77 committed 2026-03-28 21:12:29 +08:00
1 parent 49fb96d7a3
commit 26c6700152
4 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -3227,7 +3227,7 @@ function ChatPage(props: ChatPageProps) {
const session = sessionMapRef.current.get(sessionId)
const unreadCount = session?.unreadCount ?? 0
let messageLimit = currentBatchSizeRef.current
let messageLimit: number
if (offset === 0) {
const preferredLimit = Number.isFinite(options.forceInitialLimit)
@@ -7901,7 +7901,7 @@ function MessageBubble({
useEffect(() => {
if (emojiLocalPath) return
// 后端已从本地缓存找到文件(转发表情包无 CDN URL 的情况)
if (isEmoji && message.emojiLocalPath && !emojiLocalPath) {
if (isEmoji && message.emojiLocalPath) {
captureEmojiResizeBaseline()
setEmojiLocalPath(message.emojiLocalPath)
return