8000 fix query for getInitialProps is not parsed as an object · JavaScriptExpert/next.js@efbf0ef · GitHub
[go: up one dir, main page]

Skip to content

Commit efbf0ef

Browse files
committed
fix query for getInitialProps is not parsed as an object
1 parent 027622f commit efbf0ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default class Router {
2626
onPopState (e) {
2727
this.abortComponentLoad()
2828

29-
const { pathname, query } = parse(window.location.href)
29+
const { pathname, query } = parse(window.location.href, true)
3030
const route = (e.state || {}).route || toRoute(pathname)
3131

3232
Promise.resolve()
@@ -66,7 +66,7 @@ export default class Router {
6666

6767
if (route !== this.route) return
6868

69-
const { pathname, query } = parse(window.location.href)
69+
const { pathname, query } = parse(window.location.href, true)
7070

7171
let data
7272
let props

0 commit comments

Comments
 (0)
0