From: Ardis Lu Date: Tue, 23 Jun 2026 06:04:11 +0000 (-0700) Subject: Fix infinite navigation loop on 404 X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;ds=inline;p=minimal-routing Fix infinite navigation loop on 404 This regression was introduced in the refactor to use the Navigation API (ae381d71371966ac5b71203e308c772145a89d39). --- diff --git a/index.html b/index.html index d908acf..4b6099a 100644 --- a/index.html +++ b/index.html @@ -200,6 +200,9 @@ return; } const url = new URL(e.destination.url); + if (new URLPattern({ pathname: '/errors/*' }).test(url)) { // Defer to normal navigation and let web server serve the error + return; + } e.intercept({ handler() { showPage(url.pathname);