Fix: prepare URLPattern spec change (#2676)

Fixes https://github.com/denoland/fresh/issues/2627
This commit is contained in:
Marvin Hagemeister
2024-10-04 05:15:43 +02:00
committed by GitHub
parent bc55b36d3c
commit ea3df041c1
+1 -3
View File
@@ -113,9 +113,7 @@ export class UrlPatternRouter<T> implements Router<T> {
// Decode matched params
for (const [key, value] of Object.entries(match.pathname.groups)) {
if (value !== undefined) {
result.params[key] = decodeURI(value);
}
result.params[key] = value === undefined ? "" : decodeURI(value);
}
if (route.method === "ALL") {