Skip to content

Combobox results in Uncaught Error: Unexpected undefined when there is no match #1698

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

Open
qu8n opened this issue May 8, 2025 · 0 comments

Comments

@qu8n
Copy link

qu8n commented May 8, 2025

What component (if applicable)

  • Component name: Combobox

Describe the bug
When the combobox fails to match the text input, we get a console error Uncaught Error: Unexpected undefined.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://catalyst.tailwindui.com/docs/combobox
  2. Open the browser's Dev Tools console
  3. Click on the first combobox on the page
  4. Clear the placeholder text
  5. Type "jo" or any substring not found in the list
  6. See error

In step 5, alternatively we can also type " tom cook" or "tom cook " (with an extra space at the beginning or the end), and the same error occurs even though "tom cook" has a match.

Expected behavior
No console error.

Screenshots
https://github.com/user-attachments/assets/39d2a63c-b624-4cf8-a800-d2a7de05c394

Browser/Device (if applicable)

  • OS: macOS
  • Browser:
    • Chrome v136.0.7103.49 (Official Build) (arm64)
    • Brave v1.78.94 Chromium: 136.0.7103.60 (Official Build) (arm64)

Additional context

More details on the console error:

Unhandled Runtime Error
    Error: Unexpected undefined

Call Stack
    notUndefined
        node_modules/@tanstack/virtual-core/dist/esm/utils.js (50:1)
    eval
        node_modules/@tanstack/virtual-core/dist/esm/index.js (666:48)
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

No branches or pull requests

1 participant