Skip to content

Commit

Permalink
varDump(): Fix error when obj is a null-prototype object
Browse files Browse the repository at this point in the history
hasOwnProperty() wasn't actually correct in the first place - nodeType
isn't an own property of Node subclass instances.
  • Loading branch information
AbeJellinek committed Oct 9, 2024
1 parent e00d98d commit 86948f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 86948f9

Please sign in to comment.