cosmetics

This commit is contained in:
D065023
2019-12-30 14:12:14 +01:00
parent 78e6138718
commit 28362cc835

View File

@@ -49,11 +49,14 @@ module.exports = cds.service.impl(async () => {
contact contact
}) })
const changed = replicas.map(rep => { // Add a tombstone if remote address was deleted
const ext = externals.find(ext => ext.ID === rep.ID) const changed = replicas.map(
if (ext) return ext rep =>
return { ...rep, ...{ tombstone: true } } externals.find(ext => ext.ID === rep.ID) || {
}) ...rep,
...{ tombstone: true }
}
)
// update local replicas with changes from S/4 // update local replicas with changes from S/4
const local = db.transaction(msg) //> using that variant to benefit from bulk runs const local = db.transaction(msg) //> using that variant to benefit from bulk runs