1
0
Fork 0
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:
Tim Neutkens 2019-01-01 02:08:32 +01:00 committed by GitHub
parent ba8cb31a40
commit 9a9e358911
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
}