mirror of
https://github.com/cudr/slate-collaborative.git
synced 2026-03-02 03:40:18 +00:00
defensive code for when the document sometimes isn't there on server restarts. (#26)
This commit is contained in:
@@ -219,6 +219,7 @@ export default class SocketIOCollaboration {
|
|||||||
garbageCursors = (nsp: string) => {
|
garbageCursors = (nsp: string) => {
|
||||||
const doc = this.backend.getDocument(nsp)
|
const doc = this.backend.getDocument(nsp)
|
||||||
|
|
||||||
|
if (doc == null || doc == undefined) return;
|
||||||
if (!doc.cursors) return
|
if (!doc.cursors) return
|
||||||
|
|
||||||
const namespace = this.io.of(nsp)
|
const namespace = this.io.of(nsp)
|
||||||
|
|||||||
Reference in New Issue
Block a user