mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Use existing route info when Router.reload() is called. (#1654)
Earlier, it tries to get that info from the location.href. That's incorrect.
This commit is contained in:
parent
8d2bbf940d
commit
0b8a14f35c
|
@ -81,8 +81,8 @@ export default class Router {
|
||||||
|
|
||||||
if (route !== this.route) return
|
if (route !== this.route) return
|
||||||
|
|
||||||
|
const { pathname, query } = this
|
||||||
const url = window.location.href
|
const url = window.location.href
|
||||||
const { pathname, query } = parse(url, true)
|
|
||||||
|
|
||||||
this.events.emit('routeChangeStart', url)
|
this.events.emit('routeChangeStart', url)
|
||||||
const routeInfo = await this.getRouteInfo(route, pathname, query, url)
|
const routeInfo = await this.getRouteInfo(route, pathname, query, url)
|
||||||
|
|
Loading…
Reference in a new issue