We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e7f49f2 commit 3264a52Copy full SHA for 3264a52
src/hooks/useRouter.ts
@@ -31,7 +31,7 @@ const useRouter = () => {
31
navigate(path, options)
32
},
33
replace: (to: string) => {
34
- const path = encodePath(pathJoin(pathDir(location.pathname), to), true)
+ const path = encodePath(pathJoin(pathDir(pathname()), to), true)
35
clearHistory(decodeURIComponent(path))
36
navigate(path)
37
0 commit comments