forked from rDrama/rDrama
fix console error
parent
f3c7609c57
commit
eff6d93560
|
@ -8,7 +8,8 @@ for (let twoattrs of document.getElementsByClassName("twoattrs")) {
|
||||||
pcc = twoattrs[1]
|
pcc = twoattrs[1]
|
||||||
const lastCount = comments[pid]
|
const lastCount = comments[pid]
|
||||||
if (lastCount) {
|
if (lastCount) {
|
||||||
document.getElementById(`${pid}-title`).classList.add('visited')
|
const title = document.getElementById(`${pid}-title`)
|
||||||
|
if (title) title.classList.add('visited')
|
||||||
const newComments = pcc - lastCount.c
|
const newComments = pcc - lastCount.c
|
||||||
if (newComments > 0) {
|
if (newComments > 0) {
|
||||||
const elems = document.getElementsByClassName(`${pid}-new-comments`)
|
const elems = document.getElementsByClassName(`${pid}-new-comments`)
|
||||||
|
|
Loading…
Reference in New Issue