chore: tweak a bit

pull/3233/head
Divyansh Singh 1 year ago
parent d63cb867b1
commit 799659dff9

@ -182,6 +182,7 @@ export function createRouter(
link.baseURI
)
const currentUrl = window.location
const mimeType = lookup(pathname)
// only intercept inbound links
if (
!e.ctrlKey &&
@ -190,8 +191,8 @@ export function createRouter(
!e.metaKey &&
!target &&
origin === currentUrl.origin &&
// don't intercept if non-html extension is present
(lookup(pathname) == null || lookup(pathname) === 'text/html')
// intercept only html and unknown types (assume html)
(!mimeType || mimeType === 'text/html')
) {
e.preventDefault()
if (

Loading…
Cancel
Save