From 2fdb35bcc86ef18d3f01b5ccbb979dbb0d7384e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=B6=85?= Date: Tue, 20 Aug 2024 22:21:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=A7=A3=E5=86=B3=E4=BC=9A=E8=AF=9D?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8C=89=E6=9C=80=E6=96=B0=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=80=92=E5=BA=8F=E6=8E=92=E5=BA=8F=EF=BC=8C?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E4=BC=9A=E8=AF=9D=E5=88=A4=E6=96=AD=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/chat.ts | 2 +- app/utils/sync.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index 4aa58a073..5db48d2c9 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -345,7 +345,7 @@ export const useChatStore = createPersistStore( new Date(b.lastUpdate).getTime() - new Date(a.lastUpdate).getTime(), ); const currentSessionIndex = sessions.findIndex((session) => { - return session && currentSession && session.id === session.id; + return session && currentSession && session.id === currentSession.id; }); set((state) => ({ diff --git a/app/utils/sync.ts b/app/utils/sync.ts index 576c18b58..645d8ac11 100644 --- a/app/utils/sync.ts +++ b/app/utils/sync.ts @@ -150,7 +150,7 @@ const MergeStates: StateMerger = { localState.currentSessionIndex = localState.sessions.findIndex( (session) => { - return session && currentSession && session.id === session.id; + return session && currentSession && session.id === currentSession.id; }, );