We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 285046a commit d32b459Copy full SHA for d32b459
packages/core/useStorage/index.ts
@@ -95,7 +95,7 @@ export function useStorage<T extends(string|number|boolean|object|null)> (
95
96
try {
97
let rawValue = storage.getItem(key)
98
- if (rawValue === undefined && defaultValue) {
+ if (rawValue == null && defaultValue) {
99
rawValue = Serializers[type].write(defaultValue)
100
storage.setItem(key, rawValue)
101
}
0 commit comments