Skip to content
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

Overlapping inherited and own properties #58

Open
kownacki opened this issue Apr 29, 2016 · 0 comments · May be fixed by #81
Open

Overlapping inherited and own properties #58

kownacki opened this issue Apr 29, 2016 · 0 comments · May be fixed by #81
Assignees

Comments

@kownacki
Copy link

"use strict";

var clone = require("clone");

function Foo() {}
Foo.prototype.prop = 1;

var a = new Foo;
a.prop = 2;

var b = clone(a);

console.log(a, b);

Hello,

please tell if this is a bug. When parent object has an own and an inherited property with the same name, then the cloned one will not have the own one copied. This works correct if we have only an own or only an inherited one on the parent.

@pvorb pvorb self-assigned this Jul 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants