From 19b71512951ba40f8313b70ec3b290f41bcf1cdf Mon Sep 17 00:00:00 2001 From: Joseph Bushell Date: Fri, 13 Jul 2018 12:21:27 +0100 Subject: [PATCH] check first value in array is a function before using it --- lib/components/src/tabs/tabs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/src/tabs/tabs.js b/lib/components/src/tabs/tabs.js index d7f8bb86764c..41b3632e3bdc 100644 --- a/lib/components/src/tabs/tabs.js +++ b/lib/components/src/tabs/tabs.js @@ -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 }) => (