shadcn-ui / ui

Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
https://ui.shadcn.com
MIT License
62.83k stars 3.53k forks source link

[bug]: Landing page crashes when examples > forms > account > language selection dropdown clicked. #4096

Open manjushsh opened 1 week ago

manjushsh commented 1 week ago

Describe the bug

UI breaks with following errors on https://ui.shadcn.com. Not issue with any components.

image

This happens due to CommandItem component

Affected component/components

Dropdown/Select or CommandItem.

Works fine when h2 or other element is used.

image

How to reproduce

  1. Go to https://ui.shadcn.com/
  2. From examples section click the following: image
  3. Open console to see error as suggested: image

Codesandbox/StackBlitz link

No response

Logs

TypeError: items is undefined
    NextJS 12
97525-01e51dd4c392194a.js:1:5105
    NextJS 66
The resource at “https://ui.shadcn

On local:

react-dom.development.js:20702 Uncaught 
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at Function.from (<anonymous>)
    at A (index.mjs:20:4277)
    at U (index.mjs:20:3290)
    at eval (index.mjs:20:2050)
    at eval (index.mjs:20:13055)
    at Map.forEach (<anonymous>)
    at eval (index.mjs:20:13044)
    at commitHookEffectListMount (

System Info

Mozilla Firefox v 127.0.1 on Macbook M2

Before submitting

Nem4 commented 1 week ago

Can confirm. This also happens with this Language select inside of Components -> Combobox -> Form (docs)

image image

manjushsh commented 6 days ago

Thanks @Nem4. I have updated #4097 with fix for this as well