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

Error when changing object field to string #8

Open
brollb opened this issue Nov 8, 2019 · 0 comments
Open

Error when changing object field to string #8

brollb opened this issue Nov 8, 2019 · 0 comments

Comments

@brollb
Copy link

brollb commented Nov 8, 2019

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 added a commit to deepforge-dev/changeset that referenced this issue Nov 8, 2019
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

No branches or pull requests

1 participant