From 708943f3188914c36cbe8bce348c3cc57cb717b8 Mon Sep 17 00:00:00 2001 From: fly_mc Date: Wed, 27 Nov 2024 23:54:13 +0800 Subject: [PATCH] lint --- packages/frontend/src/nirax.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/nirax.ts b/packages/frontend/src/nirax.ts index 965bd6f0b..5782eb50c 100644 --- a/packages/frontend/src/nirax.ts +++ b/packages/frontend/src/nirax.ts @@ -60,7 +60,7 @@ export type RouterEvent = { beforePath: string; path: string; route: RouteDef | null; - props: Map | null; + props: Map | null; key: string; }) => void; same: () => void; @@ -258,7 +258,7 @@ export class Router extends EventEmitter implements IRouter { continue forEachRouteLoop; } } else { - if (parts[0] == null && !p.optional) { + if (!parts[0] && !p.optional) { continue forEachRouteLoop; } if (p.wildcard) { @@ -269,7 +269,7 @@ export class Router extends EventEmitter implements IRouter { break pathMatchLoop; } else { 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))); parts.shift();