fix error when comment doesnt exist on the page ur currently in
parent
ad16527a40
commit
749ebe4e23
|
@ -2,10 +2,12 @@ const socket = io()
|
|||
|
||||
socket.on('insert_reply', function(data) {
|
||||
const replies = document.getElementById(`replies-of-c_${data[0]}`)
|
||||
replies.insertAdjacentHTML('beforeend', data[1]);
|
||||
if (replies) {
|
||||
replies.insertAdjacentHTML('beforeend', data[1]);
|
||||
|
||||
notifs = notifs + 1;
|
||||
if (notifs == 1) {
|
||||
flash();
|
||||
notifs = notifs + 1;
|
||||
if (notifs == 1) {
|
||||
flash();
|
||||
}
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue