From efbf0efc98187e62ce706a1f5545f23d96ff0c32 Mon Sep 17 00:00:00 2001 From: nkzawa Date: Sun, 6 Nov 2016 15:09:37 +0900 Subject: [PATCH] fix query for getInitialProps is not parsed as an object --- lib/router.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/router.js b/lib/router.js index 87e3dd99..a0a6e8ed 100644 --- a/lib/router.js +++ b/lib/router.js @@ -26,7 +26,7 @@ export default class Router { onPopState (e) { this.abortComponentLoad() - const { pathname, query } = parse(window.location.href) + const { pathname, query } = parse(window.location.href, true) const route = (e.state || {}).route || toRoute(pathname) Promise.resolve() @@ -66,7 +66,7 @@ export default class Router { if (route !== this.route) return - const { pathname, query } = parse(window.location.href) + const { pathname, query } = parse(window.location.href, true) let data let props