chore: update for deno 1.33.x (#1139)
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
co-authored by
Luca Casonato
parent
ab73242933
commit
c224db7cb7
@@ -146,10 +146,15 @@ export function router<T = unknown>(
|
||||
const res = route.pattern.exec(req.url);
|
||||
|
||||
if (res !== null) {
|
||||
const groups = res?.pathname.groups ?? {};
|
||||
const groups: Record<string, string> = {};
|
||||
const matched = res?.pathname.groups;
|
||||
|
||||
for (const key in groups) {
|
||||
groups[key] = decodeURIComponent(groups[key]);
|
||||
for (const key in matched) {
|
||||
const value = matched[key];
|
||||
|
||||
if (value !== undefined) {
|
||||
groups[key] = decodeURIComponent(value);
|
||||
}
|
||||
}
|
||||
|
||||
for (const [method, handler] of Object.entries(route.methods)) {
|
||||
|
||||
Reference in New Issue
Block a user