From 08d164dc26fa8aac135259023d2ce13a89619dfd Mon Sep 17 00:00:00 2001 From: Kevin Jahns Date: Tue, 7 Apr 2020 14:04:27 +0200 Subject: [PATCH] renamed encoder variable #9 --- src/y-webrtc.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/y-webrtc.js b/src/y-webrtc.js index 45fa40f..39a5e9f 100644 --- a/src/y-webrtc.js +++ b/src/y-webrtc.js @@ -352,10 +352,10 @@ export class Room { */ this._awarenessUpdateHandler = ({ added, updated, removed }, origin) => { const changedClients = added.concat(updated).concat(removed) - const encoder = encoding.createEncoder() - encoding.writeVarUint(encoder, messageAwareness) - encoding.writeVarUint8Array(encoder, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients)) - broadcastRoomMessage(this, encoding.toUint8Array(encoder)) + const encoderAwareness = encoding.createEncoder() + encoding.writeVarUint(encoderAwareness, messageAwareness) + encoding.writeVarUint8Array(encoderAwareness, awarenessProtocol.encodeAwarenessUpdate(this.awareness, changedClients)) + broadcastRoomMessage(this, encoding.toUint8Array(encoderAwareness)) } this.doc.on('update', this._docUpdateHandler) this.awareness.on('change', this._awarenessUpdateHandler)