From 5060b97714c5dbcea53276e1b184cb3b043c7a6c Mon Sep 17 00:00:00 2001 From: kmxz Date: Fri, 22 Dec 2017 15:06:33 -0800 Subject: [PATCH] for navigation, jump to asset file directly rather than attempting to render them --- src/js/theme/navigation.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/js/theme/navigation.js b/src/js/theme/navigation.js index dd64d8b5..acca705b 100644 --- a/src/js/theme/navigation.js +++ b/src/js/theme/navigation.js @@ -232,7 +232,10 @@ function handleNavigation(relativeUrl, push) { // Is it an absolute url var isAbsolute = Boolean(uriParsed.hostname); - if (!usePushState || isAbsolute) { + // Is it a HTML file rather than an asset file (image, etc.) + var isHtml = /\.html$/.test(uriParsed.pathname); + + if (!usePushState || isAbsolute || !isHtml) { // Refresh the page to the new URL if pushState not supported location.href = relativeUrl; return;