Skip to content

Commit 1561414

Browse files
Only match rest path segments if no colon was found
Co-authored-by: Jason Miller <[email protected]>
1 parent 26095b1 commit 1561414

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const exec = (url, route, matches) => {
4343
// segment match:
4444
if (!m && param == val) continue;
4545
// /foo/* match
46-
if (val && flag == '*') continue;
46+
if (!m && val && flag == '*') continue;
4747
// segment mismatch / missing required field:
4848
if (!m || (!val && flag != '?' && flag != '*')) return;
4949
rest = flag == '+' || flag == '*';

0 commit comments

Comments
 (0)