Commit 67b3be24 authored by jeresig's avatar jeresig

Added additional checks for DOM nodes and window to isPlainObject, IE 8 was...

Added additional checks for DOM nodes and window to isPlainObject, IE 8 was still letting those pass through. Fixes #5669.
parent 5e811146
......@@ -433,7 +433,8 @@ jQuery.extend({
isPlainObject: function( obj ) {
// Must be an Object.
// 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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment