diff --git a/src/router.ts b/src/router.ts index 4d1c7772..f8b7a550 100644 --- a/src/router.ts +++ b/src/router.ts @@ -113,9 +113,7 @@ export class UrlPatternRouter implements Router { // 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") {