mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-08-08 11:38:42 +08:00
update
This commit is contained in:
Vendored
+5
-4
@@ -65,12 +65,13 @@ script.
|
||||
})
|
||||
|
||||
document.addEventListener('pjax:error', e => {
|
||||
if (e.request.status === 404) {
|
||||
const responseURL = e.request && e.request.responseURL
|
||||
if (e.request && e.request.status === 404) {
|
||||
!{theme.error_404 && theme.error_404.enable}
|
||||
? pjax.loadUrl('!{url_for("/404.html")}')
|
||||
: window.location.href = e.request.responseURL
|
||||
} else {
|
||||
window.location.href = e.request.responseURL
|
||||
: responseURL && (window.location.href = responseURL)
|
||||
} else if (responseURL) {
|
||||
window.location.href = responseURL
|
||||
}
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user