Open ascoders opened 8 years ago
any one help?
Hi ascoders, the diff function is not a symetrical operation, the produced patch operations are relative to the first object. If you could create a test case, I'll have a look into the issue. best regards!
hi pedroteixeira, thanks for your help, here is the test case:
git clone https://github.com/ascoders/immutable-js-diff-test-case.git
cd immutable-js-diff-test-case
npm install
node index.js
and you will see this:
the second output is correct, i think the first output should like this:
[ { op: 'remove', path: '/childs/2', value: { component: 'gaea-paragraph', props: [Object] } } , { op: 'add', path: '/childs/1/childs/0/childs' },]
hello
@pedroteixeira ^^
Occurs when complex objects
json1:
json2:
and run:
here is the result:
The second is correct