Skip to content

Commit

Permalink
Only match rest path segments if no colon was found
Browse files Browse the repository at this point in the history
Co-authored-by: Jason Miller <developit@users.noreply.github.com>
  • Loading branch information
marvinhagemeister and developit committed Sep 3, 2021
1 parent 5b82c8e commit e4f7e9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preact-iso/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const exec = (url, route, matches) => {
// segment match:
if (!m && param == val) continue;
// /foo/* match
if (val && flag == '*') continue;
if (!m && val && flag == '*') continue;
// segment mismatch / missing required field:
if (!m || (!val && flag != '?' && flag != '*')) return;
rest = flag == '+' || flag == '*';
Expand Down

0 comments on commit e4f7e9a

Please sign in to comment.