Skip to content

Commit

Permalink
fix pending event handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
dmonad committed Jan 14, 2020
1 parent 1cc967f commit e509edf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/cursor-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export const yCursorPlugin = awareness => new Plugin({
view: view => {
const awarenessListener = () => {
setTimeout(() => {
view.dispatch(view.state.tr.setMeta(yCursorPluginKey, { awarenessUpdated: true }))
if (view.docView) {
view.dispatch(view.state.tr.setMeta(yCursorPluginKey, { awarenessUpdated: true }))
}
})
}
const updateCursorInfo = () => {
Expand Down

0 comments on commit e509edf

Please sign in to comment.