mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
Merge branch 'jerryc127:dev' into dev
This commit is contained in:
commit
6019cc8b7c
7
layout/includes/third-party/pjax.pug
vendored
7
layout/includes/third-party/pjax.pug
vendored
@ -59,7 +59,10 @@ script.
|
||||
|
||||
document.addEventListener('pjax:error', e => {
|
||||
if (e.request.status === 404) {
|
||||
window.location.href = e.request.responseURL
|
||||
const usePjax = !{theme.pjax && theme.pjax.enable}
|
||||
!{theme.error_404 && theme.error_404.enable}
|
||||
? (usePjax ? pjax.loadUrl('!{url_for("/404.html")}') : window.location.href = '!{url_for("/404.html")}')
|
||||
: window.location.href = e.request.responseURL
|
||||
}
|
||||
})
|
||||
})()
|
||||
})()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user