#12199 closed bug (fixed)
$.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): http://jsbin.com/ilulip
The last value logged to the page should be false
but in IE < 9 it's true
.
Change History (9)
comment:1 Changed 10 years ago by
comment:2 Changed 10 years ago by
Component: | unfiled → core |
---|---|
Owner: | set to Rick Waldron |
Priority: | undecided → high |
Status: | new → assigned |
Thanks for the heads up—I'll have a patch for you to review today
comment:3 Changed 10 years ago by
Milestone: | None → 1.9 |
---|
comment:4 Changed 10 years ago by
Milestone: | 1.9 → None |
---|
comment:5 Changed 10 years ago by
I put together a potential fix: https://github.com/jquery/jquery/pull/1196
comment:6 Changed 10 years ago by
Owner: | changed from Rick Waldron to bjohn465 |
---|
comment:8 Changed 10 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:9 Changed 10 years ago by
Milestone: | None → 1.10 |
---|
Note: See
TracTickets for help on using
tickets.
Here is Lo-Dash's
isPlainObject
implementation that avoids this issue: https://github.com/bestiejs/lodash/blob/7520066fc916e205ef84cb97fbfe630d7c154158/lodash.js#L720-757