Skip to content

Commit a2aeb82

Browse files
author
woodcutter
committed
fix(routeToLocation): fix params type
1 parent f507dcb commit a2aeb82

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/parsers/routeToLocation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const createMatchRouteToPath = registry => ({ id, params = {}, query = {}, hash
2121
try {
2222
// remove front trailing backslash (disable '//' situation)
2323
Object.keys(params).forEach(name => {
24-
params[name] = (params[name] || '').replace(/^\//, '');
24+
params[name] = String(params[name] || '').replace(/^\//, '');
2525
});
2626

2727
// path-to-regexp (2.4.0): encodeURI by default, disable it with encode option

0 commit comments

Comments
 (0)