From 9f058c2240a0874b2120d26cb717d57f9994f052 Mon Sep 17 00:00:00 2001 From: michalsn Date: Wed, 1 Oct 2025 09:45:19 +0200 Subject: [PATCH] fix: cannot read properties of null in toggleViewsHints --- system/Debug/Toolbar/Views/toolbar.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/system/Debug/Toolbar/Views/toolbar.js b/system/Debug/Toolbar/Views/toolbar.js index 42ac7362acd7..60cd3a879aed 100644 --- a/system/Debug/Toolbar/Views/toolbar.js +++ b/system/Debug/Toolbar/Views/toolbar.js @@ -337,6 +337,11 @@ var ciDebugBar = { const OUTER_ELEMENTS = ["HTML", "BODY", "HEAD"]; var getValidElementInner = function (node, reverse) { + // handle null node + if (node === null) { + return null; + } + // handle invalid tags if (OUTER_ELEMENTS.indexOf(node.nodeName) !== -1) { for (var i = 0; i < document.body.children.length; ++i) {