Skip to main content

Bug Tracker

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):

http://jsbin.com/ilulip

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 jdalton comment:1

Here is Lo-Dash's isPlainObject implementation that avoids this issue:

https://github.com/bestiejs/lodash/blob/7520066fc916e205ef84cb97fbfe630d7c154158/lodash.js#L720-757

Changed August 05, 2012 03:03PM UTC by rwaldron comment:2

component: unfiledcore
owner: → rwaldron
priority: undecidedhigh
status: newassigned

Thanks for the heads up—I'll have a patch for you to review today

Changed September 17, 2012 04:05PM UTC by rwaldron comment:3

milestone: None1.9

Changed March 01, 2013 05:52PM UTC by dmethvin comment:4

milestone: 1.9None

Changed March 06, 2013 02:23AM UTC by bjohn465 comment:5

I put together a potential fix: https://github.com/jquery/jquery/pull/1196

Changed March 06, 2013 06:33AM UTC by gnarf comment:6

owner: rwaldronbjohn465

Changed March 06, 2013 04:17PM UTC by rwaldron comment:7

Once the review changes are made, this will be ok by me

Changed April 04, 2013 08:28PM UTC by dmethvin comment:8

Changed April 04, 2013 08:29PM UTC by dmethvin comment:9

milestone: None1.10