mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Added additional checks for DOM nodes and window to isPlainObject, IE 8 was still letting those pass through. Fixes #5669.
This commit is contained in:
parent
5e811146ee
commit
67b3be24e1
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user