Skip to content

Commit a13c93e

Browse files
EastSun5566galaxian85
authored andcommitted
fix: typing
1 parent 64a1cb7 commit a13c93e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/y-socket-io/client.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,6 @@ export class SocketIOProvider extends Observable {
185185

186186
this.initSystemListeners()
187187

188-
189188
if (autoConnect) this.connect()
190189
}
191190

src/y-socket-io/y-socket-io.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ process.on('SIGINT', function () {
4444
*
4545
* @typedef {{
4646
* ydoc: Y.Doc;
47-
* awareness: AwarenessProtocol.Awareness;
47+
* awareness: AwarenessProtocol.Awareness | null;
4848
* redisLastId: string;
4949
* storeReferences: any[] | null;
5050
* }} RedisDoc
@@ -412,7 +412,7 @@ export class YSocketIO {
412412
.catch(console.error)
413413
}
414414
)
415-
if (this.configuration.enableAwareness && doc.awareness.states.size > 0) {
415+
if (this.configuration.enableAwareness && doc.awareness && doc.awareness.states.size > 0) {
416416
socket.emit(
417417
'awareness-update',
418418
AwarenessProtocol.encodeAwarenessUpdate(

0 commit comments

Comments
 (0)