From 7b6fe66f2a1a7f227f7116b72f9dd4e10207cd44 Mon Sep 17 00:00:00 2001 From: Dogtiti <499960698@qq.com> Date: Tue, 27 Aug 2024 10:05:37 +0800 Subject: [PATCH] feat: try catch indexedDB error --- app/utils/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/utils/store.ts b/app/utils/store.ts index 1a7e0d24b77..13bef6d5dfe 100644 --- a/app/utils/store.ts +++ b/app/utils/store.ts @@ -2,7 +2,7 @@ import { create } from "zustand"; import { combine, persist, createJSONStorage } from "zustand/middleware"; import { Updater } from "../typing"; import { deepClone } from "./clone"; -import { indexDBStorage } from "@/app/utils/indexDB-storage"; +import { indexedDBStorage } from "@/app/utils/indexedDB-storage"; type SecondParam = T extends ( _f: infer _F, @@ -32,7 +32,7 @@ export function createPersistStore( ) => M, persistOptions: SecondParam>>, ) { - persistOptions.storage = createJSONStorage(() => indexDBStorage); + persistOptions.storage = createJSONStorage(() => indexedDBStorage); return create( persist( combine(