Skip to content

Commit

Permalink
fix: #4097
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm committed Aug 6, 2024
1 parent 531ec22 commit 1b9b523
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/smart-seahorses-heal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@wagmi/core": patch
---

Fixed built-in cookie storage `removeItem` working for all paths.
4 changes: 2 additions & 2 deletions packages/core/src/utils/cookie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ export const cookieStorage = {
},
setItem(key, value) {
if (typeof window === 'undefined') return
document.cookie = `${key}=${value};Path=/;SameSite=Lax`
document.cookie = `${key}=${value};path=/;samesite=Lax`
},
removeItem(key) {
if (typeof window === 'undefined') return
document.cookie = `${key}=;max-age=-1`
document.cookie = `${key}=;max-age=-1;path=/`
},
} satisfies BaseStorage

Expand Down

0 comments on commit 1b9b523

Please sign in to comment.