fix(post-helper): fixed an error where commentsCountDom is empty
This commit is contained in:
parent
d961331b06
commit
3b20655894
|
@ -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