Skip to content

Commit

Permalink
Fix: prepare URLPattern spec change
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinhagemeister committed Oct 4, 2024
1 parent ad82914 commit daa3af8
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 daa3af8

Please sign in to comment.