mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-06-08 10:03:00 +08:00
fix: check that view is not destroyed before creating node views (#5334)
This commit is contained in:
parent
22cb038997
commit
2104f0fa70
5
.changeset/sixty-gifts-dream.md
Normal file
5
.changeset/sixty-gifts-dream.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@tiptap/core": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Add a check beforecreateNodeViews so that view.setProps is not called when the view has already been destroyed
|
@ -349,6 +349,10 @@ export class Editor extends EventEmitter<EditorEvents> {
|
|||||||
* Creates all node views.
|
* Creates all node views.
|
||||||
*/
|
*/
|
||||||
public createNodeViews(): void {
|
public createNodeViews(): void {
|
||||||
|
if (this.view.isDestroyed) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.view.setProps({
|
this.view.setProps({
|
||||||
nodeViews: this.extensionManager.nodeViews,
|
nodeViews: this.extensionManager.nodeViews,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user