fix(*): 平台稳定性 - 修复会话隔离、运行时缓存与部署镜像更新链路
This commit is contained in:
1 parent
88abdd1b75
commit
e77c26d2b0
32 files changed
+788
-116
No files matched your search
@@ -1,7 +1,7 @@
|
||||
import localforage from "localforage";
|
||||
import type { StateStorage } from "zustand/middleware";
|
||||
|
||||
import { scopedStorageKey } from "@/lib/user-scope";
|
||||
import { isUserScopedPersistenceSuppressed, scopedStorageKey } from "@/lib/user-scope";
|
||||
|
||||
localforage.config({
|
||||
name: "infinite-canvas",
|
||||
@@ -24,10 +24,12 @@ export function localForageStorageForScope(scope?: string): StateStorage {
|
||||
},
|
||||
setItem: async (name, value) => {
|
||||
if (!browserStorageAvailable()) return;
|
||||
if (isUserScopedPersistenceSuppressed()) return;
|
||||
await localforage.setItem(keyFor(name), value);
|
||||
},
|
||||
removeItem: async (name) => {
|
||||
if (!browserStorageAvailable()) return;
|
||||
if (isUserScopedPersistenceSuppressed()) return;
|
||||
await localforage.removeItem(keyFor(name));
|
||||
},
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user