fix(post-helper): fixed an error where commentsCountDom is empty
This commit is contained in:
parent
69ffc208b8
commit
09b7f9633b
|
@ -92,7 +92,9 @@ function initToggleShowToc() {
|
|||
// watch comments count
|
||||
watchPostCommentsCount() {
|
||||
const commentsCountDom = this.postToolsDom.querySelector('.post-comments-count')
|
||||
if (!commentsCountDom) return
|
||||
const config = { attributes: true, childList: true }
|
||||
|
||||
const callback = function (mutationsList) {
|
||||
mutationsList.forEach((item) => {
|
||||
if (item.type === 'childList') {
|
||||
|
|
Loading…
Reference in New Issue