You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(fuselage): CardGrid renders empty grid items for null or boolean children #42804
CardGrid wraps each child with Children.map, which also visits null, undefined and boolean children. A conditionally rendered card ({cond && <Card />}) leaves an empty, padded GridItem.
Suggested fix
Map over Children.toArray(children).
Context
Found by cubic while reviewing #42763, which moved @rocket.chat/fuselage into this monorepo. The behavior is unchanged from Fuselage 0.96.0, so it was out of scope there.
Hi @tassoevan I noticed that this is a pretty forward issue for a first-time contributor like me, I know the bug hides in mapping through the child components also renders null components introducing unnecessary padding and spacing and the fix could simply be
Activity
Aviral-Ranjan commentedon Oct 16, 2026
hi, i would like to work on this.
rohanSSBJ commentedon Oct 17, 2026
Hi @tassoevan I noticed that this is a pretty forward issue for a first-time contributor like me, I know the bug hides in mapping through the child components also renders null components introducing unnecessary padding and spacing and the fix could simply be
and I can also add regression tests later
let me know if u can approve me to work on this
fix(fuselage): also guard boolean children in CardGrid
fix(fuselage): also guard boolean children in CardGrid
fix(fuselage): do not render GridItem for null or boolean children in…