From 86948f960557c18eb6489ebe228b820957d13cf0 Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Wed, 9 Oct 2024 12:55:49 -0400 Subject: [PATCH] varDump(): Fix error when obj is a null-prototype object hasOwnProperty() wasn't actually correct in the first place - nodeType isn't an own property of Node subclass instances. --- utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities.js b/utilities.js index 761e0d3..0cf67a0 100644 --- a/utilities.js +++ b/utilities.js @@ -1590,7 +1590,7 @@ var Utilities = { } } // Do the same for cross-context Node and Window objects - if (obj.hasOwnProperty('nodeType') || objType === '[object Window]') { + if ('nodeType' in obj || objType === '[object Window]') { level = maxLevel; }