Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

editor: fix react node views not rendering on editor load

Abdullah Atta2ef17b800c18
diff --git a/packages/editor/src/extensions/react/react-portal-provider.tsx b/packages/editor/src/extensions/react/react-portal-provider.tsx
index 803992655..2129c7f30 100644
--- a/packages/editor/src/extensions/react/react-portal-provider.tsx
+++ b/packages/editor/src/extensions/react/react-portal-provider.tsx
@@ -47,16 +47,6 @@ export class PortalProviderAPI extends EventDispatcher {
container: HTMLElement,
callback?: () => void
) {
- if (!this.context) return;
-
- // const wrappedChildren = children() as JSX.Element;
-
- // unstable_renderSubtreeIntoContainer(
- // this.context,
- // wrappedChildren,
- // container,
- // callback
- // );
const root = this.portals.get(container) || createRoot(container);
root.render(children());
this.portals.set(container, root);