From 5de52ad2c12eebdfe39f3ddb0f3ae13b857d7243 Mon Sep 17 00:00:00 2001 From: Petyo Ivanov Date: Tue, 17 Oct 2023 09:12:31 +0300 Subject: [PATCH] fix: compatibility with next-international Fixes #128 --- src/MDXEditor.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MDXEditor.tsx b/src/MDXEditor.tsx index 70968ff3..433e2b9b 100644 --- a/src/MDXEditor.tsx +++ b/src/MDXEditor.tsx @@ -181,7 +181,7 @@ const EditorRootElement: React.FC<{ children: React.ReactNode; className?: strin editorRootElementRef.current = popupContainer setEditorRootElementRef(editorRootElementRef) return () => { - document.body.removeChild(popupContainer) + popupContainer.remove() } }, [className, editorRootElementRef, setEditorRootElementRef]) return
{children}