Skip to content

Overlapping inherited and own properties #58

@kownacki

Description

@kownacki
"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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions