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

Function nodes mess up order #1

Open
fennifith opened this issue Sep 8, 2019 · 1 comment
Open

Function nodes mess up order #1

fennifith opened this issue Sep 8, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@fennifith
Copy link
Owner

Got this to occur in a random situation a while ago:

div(
    p("Hello"),
    () => button("Sign In").className("button")
).attr("style", "text-align: center;");

Renders as:

<div style="text-align: center;">
  <button class="button">Sign In</button>
  <p>Hello</p>
</div>
@fennifith fennifith added the bug Something isn't working label Sep 8, 2019
@fennifith
Copy link
Owner Author

I'm pretty sure this is because of how it handles promises; resolveChildren in particular uses an await Promise.all(...) that might be causing this issue before it even gets to the render function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant