Skip to content

Commit

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

0 comments on commit 3c87cd0

Please sign in to comment.