diff --git a/packages/mui-material/src/Tabs/Tabs.js b/packages/mui-material/src/Tabs/Tabs.js index dfbcd083803bd0..039591c9442d2d 100644 --- a/packages/mui-material/src/Tabs/Tabs.js +++ b/packages/mui-material/src/Tabs/Tabs.js @@ -420,9 +420,14 @@ const Tabs = React.forwardRef(function Tabs(inProps, ref) { [size]: tabMeta ? tabMeta[size] : 0, }; - // IE11 support, replace with Number.isNaN - // eslint-disable-next-line no-restricted-globals - if (isNaN(indicatorStyle[startIndicator]) || isNaN(indicatorStyle[size])) { + if ( + !( + typeof indicatorStyle[startIndicator] === 'number' && + !Number.isNaN(indicatorStyle[startIndicator]) && + typeof indicatorStyle[size] === 'number' && + !Number.isNaN(indicatorStyle[size]) + ) + ) { setIndicatorStyle(newIndicatorStyle); } else { const dStart = Math.abs(indicatorStyle[startIndicator] - newIndicatorStyle[startIndicator]);