Skip to content

Commit cd92eab

Browse files
authored
fix: cannot read properties of null in toggleViewsHints (#9736)
1 parent 8544f6a commit cd92eab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

system/Debug/Toolbar/Views/toolbar.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ var ciDebugBar = {
337337
const OUTER_ELEMENTS = ["HTML", "BODY", "HEAD"];
338338

339339
var getValidElementInner = function (node, reverse) {
340+
// handle null node
341+
if (node === null) {
342+
return null;
343+
}
344+
340345
// handle invalid tags
341346
if (OUTER_ELEMENTS.indexOf(node.nodeName) !== -1) {
342347
for (var i = 0; i < document.body.children.length; ++i) {

0 commit comments

Comments
 (0)