Unverified Commit 9a9e3589 authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Use result of getUrl() (#5973)

As getUrl() is already called and passed to initialization: https://github.com/zeit/next.js/blob/canary/packages/next/client/index.js#L46
parent ba8cb31a
...@@ -39,7 +39,7 @@ export default class Router { ...@@ -39,7 +39,7 @@ export default class Router {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
// in order for `e.state` to work on the `onpopstate` event // in order for `e.state` to work on the `onpopstate` event
// we have to register the initial route upon initialization // we have to register the initial route upon initialization
this.changeState('replaceState', format({ pathname, query }), getURL()) this.changeState('replaceState', format({ pathname, query }), as)
window.addEventListener('popstate', this.onPopState) window.addEventListener('popstate', this.onPopState)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment