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={() => {
|
onAfterDestroy={() => {
|
||||||
Array.from(editorToolbarRef.current.children).forEach(
|
Array.from(
|
||||||
(child) => child.remove(),
|
editorToolbarRef.current?.children || [],
|
||||||
);
|
).forEach((child) => child.remove());
|
||||||
Array.from(editorMenuBarRef.current.children).forEach(
|
Array.from(
|
||||||
(child) => child.remove(),
|
editorMenuBarRef.current?.children || [],
|
||||||
);
|
).forEach((child) => child.remove());
|
||||||
}}
|
}}
|
||||||
editor={DecoupledEditor}
|
editor={DecoupledEditor}
|
||||||
config={editorConfig}
|
config={editorConfig}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user