improved component composition and added tests.

This commit is contained in:
Moon.eth
2026-07-29 10:30:28 +09:00
parent 95f9d73681
commit 264ae17a8d
39 changed files with 1811 additions and 147 deletions
+6 -1
View File
@@ -56,7 +56,12 @@ function matchPattern(pattern: string, path: string): Record<string, string> | n
if (prefixed) {
const [, prefix, name] = prefixed
if (prefix && !actual.startsWith(prefix)) return null
const value = decodeURIComponent(actual.slice(prefix.length))
let value: string
try {
value = decodeURIComponent(actual.slice(prefix.length))
} catch {
return null
}
if (!value) return null
params[name.slice(1)] = value
continue