You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably pretty simple, it just doesn't seem to be working as I expect. I have a Node app and am comparing an old record to a new one and calculating a diff. I am then sending that diff to the browser where an old version of the record resides. I am then attempting to apply the diff and having no luck.
So I tried to do it all in the browser and ran the following:
var arr1 = [1,2,3,4];
var arr2 = [1,2,3,4,5,6,7];
var diffs = DeepDiff(arr1, arr2);
DeepDiff(arr1, diffs);
Expecting to output the same as arr2? Instead I get an error.
Any suggestions.
Best regards,
Paul
The text was updated successfully, but these errors were encountered:
your scenario is currently not supported.
there is a requirement for the diff to be an instance of the class Diff.
I think there is currently no way to create a proper Diff object of an arbitrary object.
So you can only use the Diff object on server side or client side, but not both, as the type gets lost on transmission.
I made a PR on this already #13. but I some sort of screwed up. Here is the commit which fixes this for you: ec7e878
Hi,
This is probably pretty simple, it just doesn't seem to be working as I expect. I have a Node app and am comparing an old record to a new one and calculating a diff. I am then sending that diff to the browser where an old version of the record resides. I am then attempting to apply the diff and having no luck.
So I tried to do it all in the browser and ran the following:
var arr1 = [1,2,3,4];
var arr2 = [1,2,3,4,5,6,7];
var diffs = DeepDiff(arr1, arr2);
DeepDiff(arr1, diffs);
Expecting to output the same as arr2? Instead I get an error.
Any suggestions.
Best regards,
Paul
The text was updated successfully, but these errors were encountered: