primitives
primitives copied to clipboard
fix: Select should not crash if getItems returns empty array
Description
- Fixes #1795 (confirmed to fix reproduction at https://github.com/radix-ui/primitives/issues/1795#issuecomment-1705308325)
- Fixes #2535
I have not added tests because I couldn't make the simple reproduction case from #2535 work in the test environment. I could reproduce it in Storybook, but this seemed like an odd thing to add to Storybook, so I didn't.
It's possible this solution is incomplete, but it fixes both of the above reproductions, so it's probably good enough for now.
Hi. I am facing a similar crash on a use case similar to the one of https://github.com/radix-ui/primitives/issues/2535 I think that this fix make sens
Our customers hit this error every single day. Is it possible to get this merged? Also happy to help out with this PR if it needs changes
In case anyone else is wondering about how maintainer activity seems to have just died without a word, there are some signs of life on the Discord:
https://discord.com/channels/752614004387610674/803656831704629298/1199950373650190336
No idea when this issue will get fixed but for now using patch-package or yarn resolutions is probably your best workaround.
We're also facing this issue. Going the patch-package route for now but it'd be great to merge this in
Hey all! I'm back on the team and will be reviewing some old PRs, cleaning up the backlog in the coming weeks. This one's first on the list. Thanks for hanging with us 🙏