We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d63cb86 commit 799659dCopy full SHA for 799659d
src/client/app/router.ts
@@ -182,6 +182,7 @@ export function createRouter(
182
link.baseURI
183
)
184
const currentUrl = window.location
185
+ const mimeType = lookup(pathname)
186
// only intercept inbound links
187
if (
188
!e.ctrlKey &&
@@ -190,8 +191,8 @@ export function createRouter(
190
191
!e.metaKey &&
192
!target &&
193
origin === currentUrl.origin &&
- // don't intercept if non-html extension is present
194
- (lookup(pathname) == null || lookup(pathname) === 'text/html')
+ // intercept only html and unknown types (assume html)
195
+ (!mimeType || mimeType === 'text/html')
196
) {
197
e.preventDefault()
198
0 commit comments