changeset icon indicating copy to clipboard operation
changeset copied to clipboard

Error when changing object field to string

Open brollb opened this issue 6 years ago • 0 comments

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.

brollb avatar Nov 08 '19 16:11 brollb