mirror of
https://github.com/ueberdosis/tiptap.git
synced 2024-11-27 14:59:27 +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.
|
||||
*/
|
||||
public createNodeViews(): void {
|
||||
if (this.view.isDestroyed) {
|
||||
return
|
||||
}
|
||||
|
||||
this.view.setProps({
|
||||
nodeViews: this.extensionManager.nodeViews,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user