未验证 提交 9a9e3589 编写于 作者: T Tim Neutkens 提交者: 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
上级 ba8cb31a
......@@ -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)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册