fix: garbage cursor error on disconnect

This commit is contained in:
Eric Maciel 2020-10-29 09:29:28 -04:00
parent 176a0f650d
commit 4598b1758a
2 changed files with 5 additions and 2 deletions

View File

@ -62,7 +62,11 @@ const withAutomerge = <T extends Editor>(
*/
e.gabageCursor = () => {
AutomergeEditor.garbageCursor(e, docId)
try {
AutomergeEditor.garbageCursor(e, docId)
} catch (err) {
console.log('garbageCursor error', err)
}
}
/**

View File

@ -124,7 +124,6 @@ const withSocketIO = <T extends AutomergeEditor>(
e.destroy = () => {
socket.close()
e.closeConnection()
}