Skip to content

Commit

Permalink
jsxy: Break routing loop on match
Browse files Browse the repository at this point in the history
instead of attempting to match and render the next routes even after a match...
  • Loading branch information
niklasfasching committed Mar 3, 2024
1 parent 412db27 commit fa02d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jsxy.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,11 @@ function renderRoute(routes, parentNode) {
if (location.search !== oldSearch) {
window.scrollTo(0, 0);
document.activeElement?.blur?.();
oldSearch = location.search;
}
Object.assign(route, {path, params});
render({tag, props: params}, parentNode);
oldSearch = location.search;
break;
}
}
}
Expand Down

0 comments on commit fa02d17

Please sign in to comment.