Skip to content

Commit

Permalink
isTab checks existence first, fixes #838
Browse files Browse the repository at this point in the history
  • Loading branch information
Gilad Gray committed Mar 17, 2017
1 parent c79d2be commit a305643
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/components/tabs2/tabs2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,5 +290,5 @@ function isEventKeyCode(e: React.KeyboardEvent<HTMLElement>, ...codes: number[])
}

function isTab(child: React.ReactChild): child is TabElement {
return (child as JSX.Element).type === Tab2;
return child != null && (child as JSX.Element).type === Tab2;
}

0 comments on commit a305643

Please sign in to comment.