We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aae97db commit b189d87Copy full SHA for b189d87
src/browser-router.tsx
@@ -23,7 +23,8 @@ export default class BrowserRouter extends Router {
23
}
24
25
static async init(opts: initParams): Promise<initResult> {
26
- opts.path = opts.history.location.pathname + opts.history.location.search + opts.history.location.hash;
+ const { pathname, search, hash } = opts.history.location;
27
+ opts.path = `${pathname}${search}${hash}`.replace(/^(\/)+/, '/');
28
const result = await super.init(opts);
29
return {
30
...result,
0 commit comments