diff --git a/src/Types/Params.ts b/src/Types/Params.ts index 300c211..045e056 100644 --- a/src/Types/Params.ts +++ b/src/Types/Params.ts @@ -7,4 +7,4 @@ * All values are strings and should be considered read-only, as they are * extracted by the router and should not be modified by application code. */ -export type Params = Record; +export type Params = Record; diff --git a/src/Utils/createRouteMatcher.ts b/src/Utils/createRouteMatcher.ts index 90fc2a5..97f5477 100644 --- a/src/Utils/createRouteMatcher.ts +++ b/src/Utils/createRouteMatcher.ts @@ -35,7 +35,7 @@ export function createRouteMatcher( // 3b. Extract route params const params: Params = {}; for (const [key, value] of Object.entries(result.pathname.groups)) { - params[key] = value; + params[key] = value ?? ''; // null → empty string } // 3c. Extract query parameters – keep duplicates as arrays