Skip to content

Commit cfd1a18

Browse files
author
Brooks Lybrand
committed
Replace undefined matches with ''
1 parent 95d6a87 commit cfd1a18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-router/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ export function matchPath(
884884
let matchedPathname = match[1];
885885
let values = match.slice(2);
886886
let params = paramNames.reduce((memo, paramName, index) => {
887-
memo[paramName] = safelyDecodeURIComponent(values[index], paramName);
887+
memo[paramName] = safelyDecodeURIComponent(values[index] || '', paramName);
888888
return memo;
889889
}, {} as Params);
890890

0 commit comments

Comments
 (0)