From fa02d17908a8b688c9e9fdde1246056cb7316d1e Mon Sep 17 00:00:00 2001 From: Niklas Fasching Date: Sun, 3 Mar 2024 23:56:07 +0100 Subject: [PATCH] jsxy: Break routing loop on match instead of attempting to match and render the next routes even after a match... --- src/jsxy.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jsxy.mjs b/src/jsxy.mjs index e4db761..2f539a3 100644 --- a/src/jsxy.mjs +++ b/src/jsxy.mjs @@ -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; } } }