Skip to content

Commit

Permalink
fix: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
EastSun5566 authored and galaxian85 committed Jan 23, 2025
1 parent 64a1cb7 commit a13c93e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/y-socket-io/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ export class SocketIOProvider extends Observable {

this.initSystemListeners()


if (autoConnect) this.connect()
}

Expand Down
4 changes: 2 additions & 2 deletions src/y-socket-io/y-socket-io.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ process.on('SIGINT', function () {
*
* @typedef {{
* ydoc: Y.Doc;
* awareness: AwarenessProtocol.Awareness;
* awareness: AwarenessProtocol.Awareness | null;
* redisLastId: string;
* storeReferences: any[] | null;
* }} RedisDoc
Expand Down Expand Up @@ -412,7 +412,7 @@ export class YSocketIO {
.catch(console.error)
}
)
if (this.configuration.enableAwareness && doc.awareness.states.size > 0) {
if (this.configuration.enableAwareness && doc.awareness && doc.awareness.states.size > 0) {
socket.emit(
'awareness-update',
AwarenessProtocol.encodeAwarenessUpdate(
Expand Down

0 comments on commit a13c93e

Please sign in to comment.