forked from rDrama/rDrama
1
0
Fork 0

fix console error

master
Aevann 2023-08-30 12:08:02 +03:00
parent f3c7609c57
commit eff6d93560
1 changed files with 2 additions and 1 deletions

View File

@ -8,7 +8,8 @@ for (let twoattrs of document.getElementsByClassName("twoattrs")) {
pcc = twoattrs[1]
const lastCount = comments[pid]
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
if (newComments > 0) {
const elems = document.getElementsByClassName(`${pid}-new-comments`)