diff --git a/packages/client/src/tiptap/index.ts b/packages/client/src/tiptap/index.ts index 303b5c9f..e975ea58 100644 --- a/packages/client/src/tiptap/index.ts +++ b/packages/client/src/tiptap/index.ts @@ -1,3 +1,10 @@ +import { EditorView } from 'prosemirror-view'; +// @see https://github.com/ueberdosis/tiptap/issues/1451 +EditorView.prototype.updateState = function updateState(state) { + if (!this.docView) return; // This prevents the matchesNode error on hot reloads + this.updateStateInner(state, this.state.plugins != state.plugins); +}; + export { getSchema } from '@tiptap/core'; export * from './react'; export * from './start-kit';