mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-14 06:00:44 +01:00
fix(nirax): Normalize path (#8877)
This commit is contained in:
parent
c9e9129373
commit
12374bd6a3
1 changed files with 4 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue