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 children are undefined #1885

Merged
merged 2 commits into from
Sep 29, 2022
Merged

Fix crash when children are undefined #1885

merged 2 commits into from
Sep 29, 2022

Conversation

RobinMalfait
Copy link
Collaborator

@RobinMalfait RobinMalfait commented Sep 29, 2022

This PR fixes an issue where if you render no children at all (probably user error because all our components require at least some form of child) the component crashes with an error. This PR ensures that children are always an error so that the issue should not occur anymore.

That said, if you just render something like:

<Menu></Menu>

It won't crash anymore, but it will also not work as expected since the MenuButton, MenuItems and MenuItem components are missing.

Fixes: #1884

@vercel
Copy link

vercel bot commented Sep 29, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
headlessui-react ✅ Ready (Inspect) Visit Preview Sep 29, 2022 at 9:59AM (UTC)
headlessui-vue ✅ Ready (Inspect) Visit Preview Sep 29, 2022 at 9:59AM (UTC)

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.

HeadlessUI doesn't work with nuxt 3
1 participant