diff --git a/src/client/app/router.ts b/src/client/app/router.ts index 49cd4e22fdfb..6e4f07740e91 100644 --- a/src/client/app/router.ts +++ b/src/client/app/router.ts @@ -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 (