Skip to content

Commit

Permalink
fix: default storage invocation (#4480)
Browse files Browse the repository at this point in the history
* fix params of removeItem

* Update createStorage.ts

* Create breezy-parrots-exist.md

---------

Co-authored-by: jxom <7336481+jxom@users.noreply.github.com>
  • Loading branch information
RodeRickIsWatching and jxom authored Dec 24, 2024
1 parent efb05fd commit 384a1d9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .changeset/breezy-parrots-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@wagmi/core": patch
"wagmi": patch
"@wagmi/vue": patch
"@wagmi/connectors": patch
---

Fixed invocation of default storage.
8 changes: 6 additions & 2 deletions packages/core/src/createStorage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,12 @@ export function getDefaultStorage() {
return noopStorage
})()
return {
getItem: storage.getItem,
removeItem: storage.removeItem,
getItem(key) {
return storage.getItem(key)
},
removeItem(key) {
storage.removeItem(key)
},
setItem(key, value) {
try {
storage.setItem(key, value)
Expand Down

0 comments on commit 384a1d9

Please sign in to comment.