diff --git a/assets/js/utils/common.js b/assets/js/utils/common.js index 94f752fd..b2f19f66 100644 --- a/assets/js/utils/common.js +++ b/assets/js/utils/common.js @@ -38,7 +38,7 @@ export function isMobile() { * @returns {Boolean} whether the TOC should be rendered as static */ export function isTocStatic() { - return document.getElementById('toc-static').dataset.kept === 'true' || window.matchMedia('only screen and (max-width: 960px)').matches; + return document.getElementById('toc-static')?.dataset?.kept === 'true' || window.matchMedia('only screen and (max-width: 960px)').matches; } /** diff --git a/assets/scss/core/layouts/_comment.scss b/assets/scss/core/layouts/_comment.scss index 3215ce41..143d27ad 100644 --- a/assets/scss/core/layouts/_comment.scss +++ b/assets/scss/core/layouts/_comment.scss @@ -1,4 +1,4 @@ -#comments { +body > #comments { padding: 2rem 1rem; display: flex;