Skip to content
Snippets Groups Projects
Unverified Commit 12374bd6 authored by tamaina's avatar tamaina Committed by GitHub
Browse files

fix(nirax): Normalize path (#8877)

parent c9e91293
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ function parsePath(path: string): ParsedPath {
wildcard,
optional,
});
} else {
} else if (part.length !== 0) {
res.push(part);
}
}
......@@ -85,9 +85,11 @@ export class Router extends EventEmitter<{
if (_DEV_) console.log('Routing: ', path, queryString);
const _parts = path.split('/').filter(part => part.length !== 0);
forEachRouteLoop:
for (const route of this.routes) {
let parts = path.split('/');
let parts = [ ..._parts ];
const props = new Map<string, string>();
pathMatchLoop:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment