forked from MarseyWorld/MarseyWorld
fix commenting
parent
b1e86067b3
commit
602b356116
|
@ -293,7 +293,7 @@ function distinguished_toggle(t, fullname) {
|
|||
|
||||
function post_comment(fullname, hide) {
|
||||
const pids = document.getElementsByClassName('pid') //to account for crosspost embed
|
||||
if (pids) {
|
||||
if (pids.length) { //need .length, getElementsByClassName is always True
|
||||
const pid = pids[pids.length - 1].value
|
||||
const comments = JSON.parse(localStorage.getItem("comment-counts"))
|
||||
const newTotal = parseInt(comments[pid].c) + 1
|
||||
|
|
Loading…
Reference in New Issue