Skip to content

Commit

Permalink
fix: move recursive renderChildren call after appendChild (#3)
Browse files Browse the repository at this point in the history
Co-authored-by: Dominique Wirz <dominique@smartive.ch>
  • Loading branch information
dwirz and Dominique Wirz committed Oct 14, 2023
1 parent 99cceea commit 5fe5aef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/react/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ function renderChildren(children, domNode) {
const dom = createDom(node.type, node.props);

if (dom) {
renderChildren(node.props.children, dom);
domNode.appendChild(dom);

if (node.type.includes('-')) {
Expand Down Expand Up @@ -62,6 +61,8 @@ function renderChildren(children, domNode) {
}
};
}

renderChildren(node.props.children, dom);
}
}
}
Expand Down

2 comments on commit 5fe5aef

@vercel
Copy link

@vercel vercel bot commented on 5fe5aef Oct 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wesc-astro – ./examples/astro

wesc-astro.vercel.app
wesc-astro-git-main-luwes.vercel.app
wesc-astro-luwes.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 5fe5aef Oct 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wesc-sveltekit – ./examples/sveltekit

wesc-sveltekit-luwes.vercel.app
wesc-sveltekit.vercel.app
wesc-sveltekit-git-main-luwes.vercel.app

Please sign in to comment.