diff --git a/assets/js/next-boot.js b/assets/js/next-boot.js index 8b55d29..76354fc 100644 --- a/assets/js/next-boot.js +++ b/assets/js/next-boot.js @@ -62,7 +62,7 @@ NexT.boot.refresh = function() { NexT.utils.registerCommonSwitch(); NexT.utils.domAddClass('#goto-comments', 'goto-comments-on'); } else { - NexT.utils.hideCommontes(); + NexT.utils.hideComments(); } NexT.utils.registerImageViewer(); diff --git a/assets/js/utils.js b/assets/js/utils.js index 2ef2605..1b5bcf3 100644 --- a/assets/js/utils.js +++ b/assets/js/utils.js @@ -481,8 +481,11 @@ NexT.utils = { }); }, - hideCommontes: function () { - document.querySelector('.post-comments').style.display = 'none'; + hideComments: function () { + let postComments = document.querySelector('.post-comments'); + if (postComments !== null) { + postComments.style.display = 'none'; + } }, hiddeLodingCmp: function (selector) {