diff --git a/src/Connector.js b/src/Connector.js index f8c76d03..4a7fe026 100644 --- a/src/Connector.js +++ b/src/Connector.js @@ -175,7 +175,7 @@ export default class AbstractConnector { buffer.setUint32(this.broadcastBufferSizePos, this.broadcastBufferSize) this.broadcastBuffer = new BinaryEncoder() this.whenRemoteResponsive().then(() => { - this.broadcast(buffer.createBuffer) + this.broadcast(buffer.createBuffer()) }) } else if (firstContent) { // send the buffer when all transactions are finished diff --git a/src/Util/relativePosition.js b/src/Util/relativePosition.js index 423274d5..5ab14b1c 100644 --- a/src/Util/relativePosition.js +++ b/src/Util/relativePosition.js @@ -3,7 +3,7 @@ import RootID from './RootID.js' export function getRelativePosition (type, offset) { if (offset === 0) { - return ['startof', type._id.user, type._id.clock || null, type._id.type || null] + return ['startof', type._id.user, type._id.clock || null, type._id.name || null, type._id.type || null] } else { let t = type._start while (t !== null) { @@ -28,7 +28,7 @@ export function fromRelativePosition (y, rpos) { if (rpos[3] === null) { id = new ID(rpos[1], rpos[2]) } else { - id = new RootID(rpos[1], rpos[3]) + id = new RootID(rpos[3], rpos[4]) } return { type: y.os.get(id),