]> git.ardis.lu - minimal-routing/commitdiff
Fix infinite navigation loop on 404 main
authorArdis Lu <ardisglu@gmail.com>
Tue, 23 Jun 2026 06:04:11 +0000 (23:04 -0700)
committerArdis Lu <ardisglu@gmail.com>
Tue, 23 Jun 2026 06:04:11 +0000 (23:04 -0700)
This regression was introduced in the refactor to use the Navigation API (ae381d71371966ac5b71203e308c772145a89d39).

index.html

index d908acfcfb55d3576718db1eab5fcb1edf839e93..4b6099a89d10324fdaa529176751cd64467ac88f 100644 (file)
         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);
This page took 0.038384 seconds and 4 git commands to generate.