From 2b72c7a98d6ea185e2503ac692380c5070db97b2 Mon Sep 17 00:00:00 2001 From: sto Date: Sun, 9 Nov 2025 11:10:46 +0100 Subject: [PATCH] Even safer check --- scripts/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/content.js b/scripts/content.js index 8241128..5445c3f 100644 --- a/scripts/content.js +++ b/scripts/content.js @@ -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);