git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5e81114
)
Added additional checks for DOM nodes and window to isPlainObject, IE 8 was still...
author
jeresig
<jeresig@gmail.com>
Sat, 19 Dec 2009 00:36:35 +0000
(19:36 -0500)
committer
jeresig
<jeresig@gmail.com>
Sat, 19 Dec 2009 00:36:35 +0000
(19:36 -0500)
src/core.js
patch
|
blob
|
history
diff --git
a/src/core.js
b/src/core.js
index
0c0d5a2
..
67b4574
100644
(file)
--- a/
src/core.js
+++ b/
src/core.js
@@
-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.
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;
}
return false;
}