fix os comparison in compareUsers

This commit is contained in:
Kevin Jahns 2017-06-21 16:29:00 +02:00
parent 060549f2cb
commit 24facaab09

View File

@ -49,9 +49,12 @@ export async function compareUsers (t, users) {
await u.db.garbageCollect()
u.db.requestTransaction(function * () {
var os = yield * this.getOperationsUntransformed()
data.os = os.untransformed.map((op) => {
data.os = {}
os.untransformed.forEach((op) => {
op = Y.Struct[op.struct].encode(op)
delete op.origin
data.os[JSON.stringify(op.id)] = op
return op
})
data.ds = yield * this.getDeleteSet()
data.ss = yield * this.getStateSet()