mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
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
This commit is contained in:
parent
ba8cb31a40
commit
9a9e358911
|
@ -39,7 +39,7 @@ export default class Router {
|
|||
if (typeof window !== 'undefined') {
|
||||
// in order for `e.state` to work on the `onpopstate` event
|
||||
// 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)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue