@tiptap/core 2.7.3 → 2.7.4
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/dist/index.cjs +6 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +6 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +2 -2
- package/src/Editor.ts +7 -0
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.7.
|
|
4
|
+
"version": "2.7.4",
|
|
5
5
|
"homepage": "https://tiptap.dev",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tiptap",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@tiptap/pm": "^2.7.
|
|
35
|
+
"@tiptap/pm": "^2.7.4"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"@tiptap/pm": "^2.7.0"
|
package/src/Editor.ts
CHANGED
|
@@ -568,6 +568,13 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|
|
568
568
|
this.emit('destroy')
|
|
569
569
|
|
|
570
570
|
if (this.view) {
|
|
571
|
+
// Cleanup our reference to prevent circular references which caused memory leaks
|
|
572
|
+
// @ts-ignore
|
|
573
|
+
const dom = this.view.dom as TiptapEditorHTMLElement
|
|
574
|
+
|
|
575
|
+
if (dom && dom.editor) {
|
|
576
|
+
delete dom.editor
|
|
577
|
+
}
|
|
571
578
|
this.view.destroy()
|
|
572
579
|
}
|
|
573
580
|
|