Closed fissssssh closed 7 months ago
i wrote this code:
const obj = { date1: new Date(), date2: new Date() }; const observer = jsonpatch.observe<any>(obj); const patchDoc = jsonpatch.generate(observer); console.log(patchDoc); observer.unobserve();
and then output:
[ { "op": "replace", "path": "/date2", "value": "2021-04-16T14:11:13.382Z" }, { "op": "replace", "path": "/date1", "value": "2021-04-16T14:11:13.382Z" } ]
absolutly i didn't do anythiny but there are two patches, so i view the source code found the error file: src/duplex.ts line:128
_generate(mirror.value, observer.object, observer.patches, "", invertible);
should use mirror.obj instead mirror.value please fix it as soon as possible.
mirror.obj
mirror.value
We have the same issue. Any plans to fix it?
replace Date with Unix Timestamp (long)
Is there a fork on npm fixing this issue?
i wrote this code:
and then output:
absolutly i didn't do anythiny but there are two patches, so i view the source code found the error file: src/duplex.ts line:128
should use
mirror.obj
insteadmirror.value
please fix it as soon as possible.