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

Fix crash when passing array children to preact-iso #555

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

marvinhagemeister
Copy link
Member

@marvinhagemeister marvinhagemeister commented Apr 26, 2021

The following snippet lead to a crash:

<Router>
  <Route path="/" />
  {["a", "b"].map(x => <Route path={`/${x}`} />}
  {condition && <Route path="/boof" />}
</Route>

The error was caused because we didn't normalize children at all.

@changeset-bot
Copy link

changeset-bot bot commented Apr 26, 2021

🦋 Changeset detected

Latest commit: c7ca0a4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
preact-iso Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@marvinhagemeister marvinhagemeister merged commit 5516a7c into main Apr 26, 2021
@marvinhagemeister marvinhagemeister deleted the iso-normalize-children branch April 26, 2021 22:58
@github-actions github-actions bot mentioned this pull request Apr 26, 2021
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 this pull request may close these issues.

None yet

2 participants