Skip to content
This repository has been archived by the owner on Jun 5, 2023. It is now read-only.

Commit

Permalink
fix(Stack): Don't render spacing for falsy children
Browse files Browse the repository at this point in the history
  • Loading branch information
diondiondion committed Jun 30, 2020
1 parent 06a5173 commit 5f24846
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Stack/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ function Stack({children, spacing, breakpoints, as, ...otherProps}) {
return (
<Box as={wrapperAs} breakpoints={breakpoints} {...otherProps}>
{React.Children.map(children, (child, index) => {
if (!child) return null;

const isFirst = index === 0;
return (
<Box
Expand Down

0 comments on commit 5f24846

Please sign in to comment.