Skip to content

Commit 384a1d9

Browse files
fix: default storage invocation (#4480)
* fix params of removeItem * Update createStorage.ts * Create breezy-parrots-exist.md --------- Co-authored-by: jxom <[email protected]>
1 parent efb05fd commit 384a1d9

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.changeset/breezy-parrots-exist.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@wagmi/core": patch
3+
"wagmi": patch
4+
"@wagmi/vue": patch
5+
"@wagmi/connectors": patch
6+
---
7+
8+
Fixed invocation of default storage.

packages/core/src/createStorage.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,12 @@ export function getDefaultStorage() {
9696
return noopStorage
9797
})()
9898
return {
99-
getItem: storage.getItem,
100-
removeItem: storage.removeItem,
99+
getItem(key) {
100+
return storage.getItem(key)
101+
},
102+
removeItem(key) {
103+
storage.removeItem(key)
104+
},
101105
setItem(key, value) {
102106
try {
103107
storage.setItem(key, value)

0 commit comments

Comments
 (0)