parent
3796a3edea
commit
ce6cc21bcd
6 changed files with 195 additions and 182 deletions
|
|
@ -107,10 +107,15 @@ export class Router extends EventEmitter<{
|
|||
}
|
||||
break pathMatchLoop;
|
||||
} else {
|
||||
if (p.startsWith && (parts[0] == null || !parts[0].startsWith(p.startsWith))) continue forEachRouteLoop;
|
||||
if (p.startsWith) {
|
||||
if (parts[0] == null || !parts[0].startsWith(p.startsWith)) continue forEachRouteLoop;
|
||||
|
||||
props.set(p.name, parts[0]);
|
||||
parts.shift();
|
||||
props.set(p.name, parts[0].substring(p.startsWith.length));
|
||||
parts.shift();
|
||||
} else {
|
||||
props.set(p.name, parts[0]);
|
||||
parts.shift();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue