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