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

Strange behaviour #75

Closed
fobdy opened this issue Jul 10, 2015 · 2 comments
Closed

Strange behaviour #75

fobdy opened this issue Jul 10, 2015 · 2 comments

Comments

@fobdy
Copy link

fobdy commented Jul 10, 2015

Code

var a = {as: '234', b: 3};
var observer = jsonpatch.observe(a);
a.b = 4
a.as = 3
a.y = 7
var patches = jsonpatch.generate(observer);

Returns only last change:

[{ op: "add", path: "/y", value: 7 }]
@miyconst
Copy link
Collaborator

@fobdy could you please provide some more details? A complete html page would be perfect.

I have checked your scenario and my result is:

[
    {"op":"replace","path":"/b","value":4},
    {"op":"replace","path":"/as","value":3},
    {"op":"add","path":"/y","value":7}
]

@warpech
Copy link
Collaborator

warpech commented Aug 18, 2015

Closing as outdated (no response from original poster, looks like a non-bug to us)

@warpech warpech closed this as completed Aug 18, 2015
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

3 participants