Skip to content

Commit 0b8a14f

Browse files
arunodarauchg
authored andcommitted
Use existing route info when Router.reload() is called. (vercel#1654)
Earlier, it tries to get that info from the location.href. That's incorrect.
1 parent 8d2bbf9 commit 0b8a14f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/router/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ export default class Router {
8181

8282
if (route !== this.route) return
8383

84+
const { pathname, query } = this
8485
const url = window.location.href
85-
const { pathname, query } = parse(url, true)
8686

8787
this.events.emit('routeChangeStart', url)
8888
const routeInfo = await this.getRouteInfo(route, pathname, query, url)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy