From 1eeb1dadc4caeacf1fc3eb0c15ffb0029d97b6ae Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Wed, 28 Dec 2022 15:04:11 +0100 Subject: [PATCH] fix(commons): Fix array creation in awareness state request Signed-off-by: Tilman Vatteroth --- commons/src/y-doc-message-transporter.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commons/src/y-doc-message-transporter.ts b/commons/src/y-doc-message-transporter.ts index de7378007..3c64e0fac 100644 --- a/commons/src/y-doc-message-transporter.ts +++ b/commons/src/y-doc-message-transporter.ts @@ -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: