Side navigation
#5669 closed bug (fixed)
Opened December 16, 2009 06:02PM UTC
Closed December 18, 2009 05:19PM UTC
Last modified April 27, 2010 08:54AM UTC
isPlainObject( null/undefined/window ) on IE
Reported by: | rkatic | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.4a1 |
Keywords: | isPlanarObject | Cc: | |
Blocked by: | Blocking: |
Description
On IE:
jQuery.isPlainObject( null ); // throws "'null.nodeType' is null or not an object"
jQuery.isPlainObject( undefined ); // throws "'undefined.nodeType' is null or not an object"
jQuery.isPlainObject( window ); // returns true
NOTE: With this patch isPlanarObject will work with windows too, until an global (window) constructor is not defined.
Attachments (0)
Change History (8)
Changed December 17, 2009 02:16AM UTC by comment:1
description: | On IE: \ {{{ \ jQuery.isPlanarObject( null ); \ // throws "'null.nodeType' is null or not an object" \ }}} \ {{{ \ jQuery.isPlanarObject( undefined ); \ // throws "'undefined.nodeType' is null or not an object" \ }}} \ {{{ \ jQuery.isPlanarObject( window ); \ // returns true \ }}} \ \ [http://github.com/rkatic/jquery/commit/44218409cc52ad83cd4e424dfd1201155967a1f8 Patch] \ NOTE: With this patch isPlanarObject will work with windows too, until an global (window) constructor is not defined. → On IE: \ {{{ \ jQuery.isPlainObject( null ); \ // throws "'null.nodeType' is null or not an object" \ }}} \ {{{ \ jQuery.isPlainObject( undefined ); \ // throws "'undefined.nodeType' is null or not an object" \ }}} \ {{{ \ jQuery.isPlainObject( window ); \ // returns true \ }}} \ \ [http://github.com/rkatic/jquery/commit/44218409cc52ad83cd4e424dfd1201155967a1f8 Patch] \ NOTE: With this patch isPlanarObject will work with windows too, until an global (window) constructor is not defined. |
---|---|
summary: | isPlanarObject( null/undefined/window ) on IE → isPlainObject( null/undefined/window ) on IE |
Changed December 17, 2009 03:08AM UTC by comment:2
Replying to [comment:1 dmethvin]:
Corrected the spelling of the method name; the patch looks like a good idea.
Thanks, but there is still an isPlanarObject at the end (ups).
Too much 3D programming for this week I guess :).
Changed December 17, 2009 03:15AM UTC by comment:3
I made another mistake.
On first two cases (null and undefined), isPlainObjects returns true instead of throwing an error. Anyway the patch is fixing that.
Changed December 17, 2009 03:20AM UTC by comment:4
oops, ignore my last comment!
Changed December 18, 2009 05:19PM UTC by comment:6
resolution: | → fixed |
---|---|
status: | new → closed |
Changed December 19, 2009 12:37AM UTC by comment:7
That commit wasn't enough. IE 8 was still failing so I landed some more checks:
http://github.com/jquery/jquery/commit/67b3be24e1215609cca524ee8158fc7e6e80db93
Corrected the spelling of the method name; the patch looks like a good idea.