From 020ea017eb9ebd4cb2e0033aa39d7d1acd5064b6 Mon Sep 17 00:00:00 2001 From: Innei Date: Thu, 3 Oct 2024 23:16:08 +0800 Subject: [PATCH] chore: fix typo Signed-off-by: Innei --- apps/renderer/src/store/inbox/store.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/renderer/src/store/inbox/store.ts b/apps/renderer/src/store/inbox/store.ts index f0a8b34ea..6068f256e 100644 --- a/apps/renderer/src/store/inbox/store.ts +++ b/apps/renderer/src/store/inbox/store.ts @@ -13,16 +13,16 @@ export const useInboxStore = createZustandStore("inbox")(() => ({ const set = createImmerSetter(useInboxStore) class InboxActionStatic { - upsertMany(inboxs: InboxModel[]) { - if (inboxs.length === 0) return + upsertMany(inboxes: InboxModel[]) { + if (inboxes.length === 0) return set((state) => { - for (const inbox of inboxs) { + for (const inbox of inboxes) { state.inboxes[inbox.id] = inbox } return state }) - runTransactionInScope(() => InboxService.upsertMany(inboxs)) + runTransactionInScope(() => InboxService.upsertMany(inboxes)) } async fetchInboxById(id: string) {