fix: check for destroyed editor before creating node views in react
This commit is contained in:
@@ -64,7 +64,11 @@ export class PureEditorContent extends React.Component<EditorContentProps, Edito
|
|||||||
editor.contentComponent = this
|
editor.contentComponent = this
|
||||||
|
|
||||||
// TODO: alternative to setTimeout?
|
// TODO: alternative to setTimeout?
|
||||||
setTimeout(() => editor.createNodeViews(), 0)
|
setTimeout(() => {
|
||||||
|
if (!editor.isDestroyed) {
|
||||||
|
editor.createNodeViews()
|
||||||
|
}
|
||||||
|
}, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user