Skip to content

Commit

Permalink
Fix: prepare URLPattern spec change (#2676)
Browse files Browse the repository at this point in the history
Fixes #2627
  • Loading branch information
marvinhagemeister authored Oct 4, 2024
1 parent bc55b36 commit ea3df04
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down

0 comments on commit ea3df04

Please sign in to comment.