mirror of
https://github.com/paricafe/misskey.git
synced 2025-01-22 08:38:41 -06:00
lint
This commit is contained in:
parent
3b37c3e90d
commit
708943f318
1 changed files with 3 additions and 3 deletions
|
@ -60,7 +60,7 @@ export type RouterEvent = {
|
||||||
beforePath: string;
|
beforePath: string;
|
||||||
path: string;
|
path: string;
|
||||||
route: RouteDef | null;
|
route: RouteDef | null;
|
||||||
props: Map<string, string> | null;
|
props: Map<string, string | boolean> | null;
|
||||||
key: string;
|
key: string;
|
||||||
}) => void;
|
}) => void;
|
||||||
same: () => void;
|
same: () => void;
|
||||||
|
@ -258,7 +258,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
||||||
continue forEachRouteLoop;
|
continue forEachRouteLoop;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (parts[0] == null && !p.optional) {
|
if (!parts[0] && !p.optional) {
|
||||||
continue forEachRouteLoop;
|
continue forEachRouteLoop;
|
||||||
}
|
}
|
||||||
if (p.wildcard) {
|
if (p.wildcard) {
|
||||||
|
@ -269,7 +269,7 @@ export class Router extends EventEmitter<RouterEvent> implements IRouter {
|
||||||
break pathMatchLoop;
|
break pathMatchLoop;
|
||||||
} else {
|
} else {
|
||||||
if (p.startsWith) {
|
if (p.startsWith) {
|
||||||
if (parts[0] == null || !parts[0].startsWith(p.startsWith)) continue forEachRouteLoop;
|
if (!parts[0] || !parts[0].startsWith(p.startsWith)) continue forEachRouteLoop;
|
||||||
|
|
||||||
props.set(p.name, safeURIDecode(parts[0].substring(p.startsWith.length)));
|
props.set(p.name, safeURIDecode(parts[0].substring(p.startsWith.length)));
|
||||||
parts.shift();
|
parts.shift();
|
||||||
|
|
Loading…
Reference in a new issue