1
0
Fork 0
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:
Arunoda Susiripala 2017-04-07 22:22:41 +05:30 committed by Guillermo Rauch
parent 8d2bbf940d
commit 0b8a14f35c

View file

@ -81,8 +81,8 @@ export default class Router {
if (route !== this.route) return
const { pathname, query } = this
const url = window.location.href
const { pathname, query } = parse(url, true)
this.events.emit('routeChangeStart', url)
const routeInfo = await this.getRouteInfo(route, pathname, query, url)