Skip to content

Commit

Permalink
fix: props can be undefined making stacks crash (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
LivioGama authored Nov 8, 2024
1 parent f320d62 commit 8b7de65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/stack/stack.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const Stack: React.FunctionComponent<StackProps> = (incomingProps) => {
<React.Fragment key={`stack-${index}`}>
{!!item && (
<React.Fragment>
<RNView style={{ zIndex: item.props.zIndex }}>{item}</RNView>
<RNView style={{ zIndex: item.props?.zIndex }}>{item}</RNView>
{index !== children.length - 1 ? (
<RNView style={computedStyle.stackSpacing} />
) : null}
Expand Down

0 comments on commit 8b7de65

Please sign in to comment.