mirror of
https://github.com/cudr/slate-collaborative.git
synced 2024-10-27 20:34:06 +00:00
fix: garbage cursor error on disconnect
This commit is contained in:
parent
176a0f650d
commit
4598b1758a
@ -62,7 +62,11 @@ const withAutomerge = <T extends Editor>(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
e.gabageCursor = () => {
|
e.gabageCursor = () => {
|
||||||
AutomergeEditor.garbageCursor(e, docId)
|
try {
|
||||||
|
AutomergeEditor.garbageCursor(e, docId)
|
||||||
|
} catch (err) {
|
||||||
|
console.log('garbageCursor error', err)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -124,7 +124,6 @@ const withSocketIO = <T extends AutomergeEditor>(
|
|||||||
|
|
||||||
e.destroy = () => {
|
e.destroy = () => {
|
||||||
socket.close()
|
socket.close()
|
||||||
|
|
||||||
e.closeConnection()
|
e.closeConnection()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user