Skip to content

Commit

Permalink
fix(router): fix for correct navigate if used route path format like …
Browse files Browse the repository at this point in the history
…`/:optionalParam(any+[regexp]+)?` (#4179)
  • Loading branch information
100100101 committed May 23, 2023
1 parent f164b45 commit 6d40482
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/modules/router/router-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,11 @@ class Router extends Framework7Class {
}
}
const url = router.constructRouteUrl(route, { params, query });

if (url === '') {
return '/'
}

if (!url) {
throw new Error(`Framework7: can't construct URL for route with name "${name}"`);
}
Expand Down

0 comments on commit 6d40482

Please sign in to comment.