fix: resolve client-side navigation and popover issues

- Fix popover crash on missing Content-Type header (null check)
- Fix SPA loading bar corrupting page via micromorph interference
  (remove bar before morph, use ephemeral DOM elements instead of
  persistent reference)
- Add stopLoading() cleanup in navigation finally block
This commit is contained in:
saberzero1
2026-05-24 17:10:03 +02:00
parent 7f00400ad2
commit 0d9b356046
2 changed files with 14 additions and 5 deletions
+3 -1
View File
@@ -60,7 +60,9 @@ async function mouseEnterHandler(
})
if (!response) return
const [contentType] = response.headers.get("Content-Type")!.split(";")
const rawContentType = response.headers.get("Content-Type")
if (!rawContentType) return
const [contentType] = rawContentType.split(";")
const [contentTypeCategory, typeInfo] = contentType.split("/")
const popoverElement = document.createElement("div")