Fixed console error when unmounting ckeditor
This commit is contained in:
parent
9565b80fb1
commit
fb595a16bf
@ -369,12 +369,12 @@ export default function TextEditor(props) {
|
||||
);
|
||||
}}
|
||||
onAfterDestroy={() => {
|
||||
Array.from(editorToolbarRef.current.children).forEach(
|
||||
(child) => child.remove(),
|
||||
);
|
||||
Array.from(editorMenuBarRef.current.children).forEach(
|
||||
(child) => child.remove(),
|
||||
);
|
||||
Array.from(
|
||||
editorToolbarRef.current?.children || [],
|
||||
).forEach((child) => child.remove());
|
||||
Array.from(
|
||||
editorMenuBarRef.current?.children || [],
|
||||
).forEach((child) => child.remove());
|
||||
}}
|
||||
editor={DecoupledEditor}
|
||||
config={editorConfig}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user