Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object children are rendered as <undefined> #245

Closed
lucacasonato opened this issue Sep 12, 2022 · 6 comments · Fixed by #246
Closed

Object children are rendered as <undefined> #245

lucacasonato opened this issue Sep 12, 2022 · 6 comments · Fixed by #246

Comments

@lucacasonato
Copy link

import render from "https://esm.sh/[email protected][email protected]";
import { h } from "https://esm.sh/[email protected]";
console.log(render(h("div", null, { hello: "world" })));
$ deno run test.ts
<div><undefined></undefined></div>
@JoviDeCroock
Copy link
Member

Would you expect an error to be thrown instead or just skipping it?

@lucacasonato
Copy link
Author

I don't really care as long as it matches what client side rendering does (which I think is skipping by default, or error if preact/debug is loaded).

@lucacasonato
Copy link
Author

I think it would make most sense to always throw (because this is always user error), but I understand why that may not make sense as a default for preact due to possible size implications.

@developit
Copy link
Member

My preference here is to silently ignore the object. We have throwing/warning in debug.

@pitust
Copy link

pitust commented Oct 1, 2022

Fragments are rendered as <undefined>stuff inside the fragment</undefined>, which is undesirable as well.

@marvinhagemeister
Copy link
Member

@pitust please file a new issue for that with details on how to reproduce it. Quickly checked on my end and rendering Fragments works as expected.

marvinhagemeister pushed a commit that referenced this issue Oct 4, 2022
marvinhagemeister pushed a commit that referenced this issue Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants