This commit is contained in:
Cell
2025-07-30 23:57:57 +08:00
committed by GitHub
3 changed files with 6 additions and 5 deletions

View File

@@ -32,7 +32,8 @@ export function createStorage<T extends object>(type: StorageType, storagePrefix
storageData = JSON.parse(json);
} catch {}
if (storageData) {
// storageData may be `false` if it is boolean type
if (storageData !== null) {
return storageData as T[K];
}
}