fix build error

This commit is contained in:
sijinhui 2024-09-19 11:54:27 +08:00
parent 3fd1035bfa
commit 0c2d4ab056

View File

@ -7,7 +7,7 @@ const localStorage = safeLocalStorage();
class IndexedDBStorage implements StateStorage { class IndexedDBStorage implements StateStorage {
public async getItem(name: string): Promise<string | null> { public async getItem(name: string): Promise<string | null> {
if (typeof window === "undefined") { if (typeof window === "undefined") {
return; return null;
} }
try { try {
const value = (await get(name)) || localStorage.getItem(name); const value = (await get(name)) || localStorage.getItem(name);