diff --git a/src/atomWithHash.ts b/src/atomWithHash.ts index 833bfbd..120b6e9 100644 --- a/src/atomWithHash.ts +++ b/src/atomWithHash.ts @@ -42,7 +42,7 @@ export function atomWithHash( if (setHashOption === 'replaceState') { setHash = (searchParams) => { window.history.replaceState( - null, + window.history.state, '', `${window.location.pathname}${window.location.search}#${searchParams}`, );