Skip to content

Error when changing object field to string #8

Open
@brollb

Description

@brollb

Currently, there is an issue when diffing and patching an object where the types of a field changes from an object to a string.

That is, I would expect the following to work:

    var a = {hello: {nested: 2}};
    var b = {hello: 3};
    var changeset = diff(a, b);
    var b_ = diff.apply(changeset, a);
    expect(b).to.deep.equals(b_);

However, b_ is set to {hello: {}} following the above operations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions