Side navigation
#12199 closed bug (fixed)
Opened August 05, 2012 07:14AM UTC
Closed April 04, 2013 08:28PM UTC
Last modified April 04, 2013 08:29PM UTC
$.isPlainObject false positive in IE < 9
| Reported by: | jdalton | Owned by: | bjohn465 | 
|---|---|---|---|
| Priority: | high | Milestone: | 1.10 | 
| Component: | core | Version: | 1.8rc1 | 
| Keywords: | Cc: | ||
| Blocked by: | Blocking: | 
Description
IE < 9 iterates over inherited properties **before** own properties which breaks the assumption in isPlainObject.
View the simple test case here (in IE < 9 and some other modern browser):
The last value logged to the page should be false but in IE < 9 it's true.
Attachments (0)
Change History (9)
Changed August 05, 2012 07:20AM UTC by comment:1
Changed August 05, 2012 03:03PM UTC by comment:2
| component: | unfiled → core | 
|---|---|
| owner: | → rwaldron | 
| priority: | undecided → high | 
| status: | new → assigned | 
Thanks for the heads up—I'll have a patch for you to review today
Changed September 17, 2012 04:05PM UTC by comment:3
| milestone: | None → 1.9 | 
|---|
Changed March 01, 2013 05:52PM UTC by comment:4
| milestone: | 1.9 → None | 
|---|
Changed March 06, 2013 02:23AM UTC by comment:5
I put together a potential fix: https://github.com/jquery/jquery/pull/1196
Changed March 06, 2013 06:33AM UTC by comment:6
| owner: | rwaldron → bjohn465 | 
|---|
Changed March 06, 2013 04:17PM UTC by comment:7
Once the review changes are made, this will be ok by me
Changed April 04, 2013 08:28PM UTC by comment:8
| resolution: | → fixed | 
|---|---|
| status: | assigned → closed | 
Changed April 04, 2013 08:29PM UTC by comment:9
| milestone: | None → 1.10 | 
|---|
Here is Lo-Dash's
isPlainObjectimplementation that avoids this issue:https://github.com/bestiejs/lodash/blob/7520066fc916e205ef84cb97fbfe630d7c154158/lodash.js#L720-757