A { a: undefined }
B {}
patch = diff(A,B) (results in 'remove a')
patchInPlace(patch, A)
fails with "path does not exist"
// key must exist for remove
if(notFound(pointer) || pointer.target[pointer.key] === void 0) {
throw new InvalidPatchOperationError('path does not exist ' + change.path);
}
The cause is the check for pointer.target[pointer.key] not being undefined.
The key needs to be present, but if the value is undefined that shouldn't prevent a removal.
A { a: undefined }
B {}
patch = diff(A,B) (results in 'remove a')
patchInPlace(patch, A)
fails with "path does not exist"
The cause is the check for pointer.target[pointer.key] not being undefined.
The key needs to be present, but if the value is undefined that shouldn't prevent a removal.