Skip to content

Commit

Permalink
defensive code for when the document sometimes isn't there on server …
Browse files Browse the repository at this point in the history
…restarts. (#26)
  • Loading branch information
jnbarlow authored Oct 27, 2020
1 parent a9b20ae commit 5e0ee3e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/backend/src/SocketIOConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ export default class SocketIOCollaboration {
garbageCursors = (nsp: string) => {
const doc = this.backend.getDocument(nsp)

if (doc == null || doc == undefined) return;
if (!doc.cursors) return

const namespace = this.io.of(nsp)
Expand Down

0 comments on commit 5e0ee3e

Please sign in to comment.