What package within Headless UI are you using?
@headlessui/react
What version of that package are you using?
v2.1.1
What browser are you using?
Chrome, but does not matter
Reproduction URL
https://codesandbox.io/p/devbox/still-leftpad-xr4zpk?file=%2Fsrc%2FCombobox.jsx&embed=1
Steps to reproduce:
- click the field
- clear the input (type "a")
- press enter
- error happens
Describe your issue
I am randomly getting the error: Error: Unexpected undefined when the list is empty.

I think one possible fix here is to bump the @tanstack/react-virtual package to the latest version and disable the virtualizer when the list is empty
This is related to this ticket TanStack/virtual#696 and the related link PR: TanStack/virtual#741