fix(commons): Fix array creation in awareness state request

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2022-12-28 15:04:11 +01:00
parent b7b0021ff7
commit 1eeb1dadc4

View file

@ -82,9 +82,10 @@ export abstract class YDocMessageTransporter extends EventEmitter2 {
break
case MessageType.COMPLETE_AWARENESS_STATE_REQUEST:
this.send(
encodeAwarenessUpdateMessage(this.awareness, [
...this.awareness.getStates().keys()
])
encodeAwarenessUpdateMessage(
this.awareness,
Array.from(this.awareness.getStates().keys())
)
)
break
case MessageType.AWARENESS_UPDATE: