Skip to content

Commit

Permalink
Update createStorage.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
jxom authored Dec 24, 2024
1 parent 3c87cd0 commit d2b84fc
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/core/src/createStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,11 @@ export function getDefaultStorage() {
return noopStorage
})()
return {
getItem: storage.getItem,
getItem(key) {
return storage.getItem(key)
},
removeItem(key) {
try {
storage.removeItem(key);
// silence errors by default (QuotaExceededError, SecurityError, etc.)
} catch {}
storage.removeItem(key)
},
setItem(key, value) {
try {
Expand Down

0 comments on commit d2b84fc

Please sign in to comment.