Skip to content

Commit

Permalink
check first value in array is a function before using it
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Bushell committed Jul 13, 2018
1 parent 857ff0f commit 19b7151
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components/src/tabs/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const Tabs = ({ children, selected, onSelect, absolute, bordered }) => {
id,
render:
typeof content === 'function' ? content
: Array.isArray(content) ? content[0]
: Array.isArray(content) && typeof content[0] === 'function' ? content[0]
: // eslint-disable-next-line react/prop-types
({ active }) => (
<VisuallyHidden active={active} role="tabpanel">
Expand Down

0 comments on commit 19b7151

Please sign in to comment.