Open
Description
In the simple example, a weird "copy" patch is calculated as a diff what is wrong. Check it on codepen or here:
var a = {
choices: [
{id: "2"}
]
};
var b = {
choices: [
{id: "2"}
],
description: "2"
};
var diff = jdr.diff(a, b);
jdr.apply(a, diff, {OBJ_COM:false});
console.info("diff:", diff); // results [{op: "copy", path: "/description", from: "/choices/0"}]
console.info("this should be b:", a); // results something else than b
Metadata
Assignees
Labels
No labels