diff --git a/layout/_scripts/pjax.swig b/layout/_scripts/pjax.swig index 04c0a434bb..dff911edf3 100644 --- a/layout/_scripts/pjax.swig +++ b/layout/_scripts/pjax.swig @@ -36,8 +36,8 @@ window.addEventListener('pjax:success', () => { // Force synchronous loading of peripheral JS. script.async = false; } - if (element.getAttribute('pjax') !== null) { - script.setAttribute('pjax', ''); + if (element.dataset.pjax !== undefined) { + script.dataset.pjax = ''; } if (code !== '') { script.appendChild(document.createTextNode(code)); diff --git a/package.json b/package.json index 91076a5bea..d18f895993 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hexo-theme-next", - "version": "7.7.2", + "version": "7.8.0", "description": "Elegant and powerful theme for Hexo.", "main": "gulpfile.js", "scripts": {