mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 20:38:52 +00:00
fix: add prefer-dom-node-remove rule (#5112)
This commit is contained in:
@@ -10,7 +10,7 @@ export const RootBlockHub = () => {
|
||||
const div = ref.current;
|
||||
if (blockHub) {
|
||||
if (div.hasChildNodes()) {
|
||||
div.removeChild(div.firstChild as ChildNode);
|
||||
(div.firstChild as ChildNode).remove();
|
||||
}
|
||||
div.append(blockHub);
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ const BlockSuiteEditorImpl = ({
|
||||
}
|
||||
container.append(editor);
|
||||
return () => {
|
||||
container.removeChild(editor);
|
||||
editor.remove();
|
||||
};
|
||||
}, [editor]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user