mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
fix: 修正 abcjs 報錯的 bug
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
script.
|
||||
(() => {
|
||||
(() => {
|
||||
const getCommentUrl = () => {
|
||||
const eleGroup = document.querySelectorAll('#recent-posts .article-title')
|
||||
let urlArray = []
|
||||
@@ -18,7 +18,9 @@ script.
|
||||
includeReply: false
|
||||
}).then(function (res) {
|
||||
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
|
||||
item.textContent = res[index].count
|
||||
if (res[index]) {
|
||||
item.textContent = res[index].count
|
||||
}
|
||||
})
|
||||
}).catch(function (err) {
|
||||
console.log(err)
|
||||
|
||||
Reference in New Issue
Block a user