Closed djMax closed 8 years ago
From the spec:
Each operation in the sequence is applied to the target document; the resulting document becomes the target of the next operation.
Nice catch. It is interesting no one has reported this before.
I think the reason is that it only affects the root key. Otherwise the changes are sort of fed back automatically.
Indeed.
On Oct 19, 2016, at 9:42 PM, Max Metral notifications@github.com wrote:
I think the reason is that it only affects the root key. Otherwise the changes are sort of fed back automatically.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bruth/jsonpatch-js/issues/25#issuecomment-254987622, or mute the thread https://github.com/notifications/unsubscribe-auth/AAfcRumEz4arkb1RaOhHTyN6_NX2X20bks5q1sb_gaJpZM4KaGDL.
This line: https://github.com/bruth/jsonpatch-js/blob/master/jsonpatch.js#L519 feeds the ORIGINAL document into each successive step. Shouldn't it be feeding in
result
instead ofdocument
?