defensive code for when the document sometimes isn't there on server restarts. (#26)

This commit is contained in:
John Barlow
2020-10-27 18:55:29 -04:00
committed by GitHub
parent a9b20ae99d
commit 5e0ee3e8d9

View File

@@ -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)