Even safer check
This commit is contained in:
@@ -52,7 +52,7 @@ function checkNewMessages() {
|
|||||||
const el = messageNode.firstChild.firstChild.firstChild.firstChild;
|
const el = messageNode.firstChild.firstChild.firstChild.firstChild;
|
||||||
if (seenMessages.has(el)) continue;
|
if (seenMessages.has(el)) continue;
|
||||||
const rootNode = messageNode.parentNode.parentNode;
|
const rootNode = messageNode.parentNode.parentNode;
|
||||||
if (!rootNode.firstChild.firstChild) continue;
|
if (!rootNode?.firstChild?.firstChild) continue;
|
||||||
const name = rootNode.firstChild.firstChild.innerHTML;
|
const name = rootNode.firstChild.firstChild.innerHTML;
|
||||||
newElements = true;
|
newElements = true;
|
||||||
seenMessages.add(el);
|
seenMessages.add(el);
|
||||||
|
|||||||
Reference in New Issue
Block a user