Skip to content

Incorrectly rejects identical structure when encountering circularity #113

Open
@cpcallen

Description

@cpcallen

In this case there is no difference between o1 and o2, but diff incorrectly reports that there is:

var o1 = {};
var o2 = {};
o1.foo = o1;
o2.foo = o2;
diff(o1, o2)

By comparison, in this case there is actually a structural difference (which is correctly detected, albeit with less than entirely illuminating output):

var o1 = {};
var o2 = {};
o1.foo = o1;
o2.foo = {foo: o2};
diff(o1, o2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions