Skip to content

isPlainObject difference between v2.2.1 and v1.11.2 #2968

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mitar opened this issue Mar 3, 2016 · 1 comment
Closed

isPlainObject difference between v2.2.1 and v1.11.2 #2968

mitar opened this issue Mar 3, 2016 · 1 comment

Comments

@mitar
Copy link

mitar commented Mar 3, 2016

It seems that there is a difference for the following object between v2.2.1 (it returns that it is the plain object) and v1.11.2 (it returns that it is not):

var parentObj = {foo: "bar"};
var childObj = Object.assign(Object.create(parentObj), {bar: "foo"});
jQuery.isPlainObject(childObj);

I think that 1.11.2 is correct.

@mgol
Copy link
Member

mgol commented Mar 3, 2016

Confirmed. The API page says:

Check to see if an object is a plain object (created using "{}" or "new Object").

and the object presented here can't be created in this way.

The problem is present both on master and 2.2-stable but not present on 1.12-stable (so 1.12.1 is OK as well).

Thanks for the report!

@mgol mgol added this to the 1.12.2/2.2.2 milestone Mar 3, 2016
timmywil added a commit to timmywil/jquery that referenced this issue Mar 3, 2016
timmywil added a commit to timmywil/jquery that referenced this issue Mar 3, 2016
mitar added a commit to mitar/is-plain-object that referenced this issue Mar 24, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants