Skip to content

Commit

Permalink
Added additional checks for DOM nodes and window to isPlainObject, IE…
Browse files Browse the repository at this point in the history
… 8 was still letting those pass through. Fixes #5669.
  • Loading branch information
jeresig committed Dec 19, 2009
1 parent 5e81114 commit 67b3be2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core.js
Expand Up @@ -433,7 +433,8 @@ jQuery.extend({
isPlainObject: function( obj ) { isPlainObject: function( obj ) {
// Must be an Object. // Must be an Object.
// Because of IE, we also have to check the presence of the constructor property. // Because of IE, we also have to check the presence of the constructor property.
if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) ) { // Make sure that DOM nodes and window objects don't pass through, as well
if ( !obj || toString.call(obj) !== "[object Object]" || !("constructor" in obj) || obj.nodeType || obj.setInterval ) {
return false; return false;
} }


Expand Down

0 comments on commit 67b3be2

Please sign in to comment.