@tiptap/core 2.0.0-beta.219 → 2.0.0-beta.220

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiptap/core",
3
3
  "description": "headless rich text editor",
4
- "version": "2.0.0-beta.219",
4
+ "version": "2.0.0-beta.220",
5
5
  "homepage": "https://tiptap.dev",
6
6
  "keywords": [
7
7
  "tiptap",
@@ -35,7 +35,7 @@
35
35
  "@tiptap/pm": "^2.0.0-beta.209"
36
36
  },
37
37
  "devDependencies": {
38
- "@tiptap/pm": "^2.0.0-beta.219"
38
+ "@tiptap/pm": "^2.0.0-beta.220"
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
package/src/Editor.ts CHANGED
@@ -320,6 +320,12 @@ export class Editor extends EventEmitter<EditorEvents> {
320
320
  * @param transaction An editor state transaction
321
321
  */
322
322
  private dispatchTransaction(transaction: Transaction): void {
323
+ // if the editor / the view of the editor was destroyed
324
+ // the transaction should not be dispatched as there is no view anymore.
325
+ if (this.view.isDestroyed) {
326
+ return
327
+ }
328
+
323
329
  if (this.isCapturingTransaction) {
324
330
  if (!this.capturedTransaction) {
325
331
  this.capturedTransaction = transaction