+11
-3
src/lib/navigation/router.tsx
+11
-3
src/lib/navigation/router.tsx
···
367
367
const pattern = (route._regex ||= buildPathRegex(route.path));
368
368
369
369
const match = pattern.exec(path);
370
370
-
371
371
-
if (!match || (validate && !validate(match.groups!))) {
370
370
+
if (!match) {
372
371
continue;
373
372
}
374
373
375
375
-
const params = match.groups!;
374
374
+
const rawParams = match.groups!;
375
375
+
const params: Record<string, string> = {};
376
376
+
377
377
+
for (const key in rawParams) {
378
378
+
params[key] = decodeURIComponent(rawParams[key]);
379
379
+
}
380
380
+
381
381
+
if (validate && !validate(params)) {
382
382
+
continue;
383
383
+
}
376
384
377
385
let id: string | undefined;
378
386
if (route.single) {