We are building a collaborative editor using ProseMirror and WebSockets and noticed the editor sometimes starts throwing a crazy number of errors. Looking through the call stack the errors were caused by bad dispatch calls, specifically when
view.docView did not exist. Our hacky patch this was to replace
view.docView && view.dispatch(...args)
This feels especially hacky since
docView is not described in the ProseMirror documentation. Is there a better approach?