File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
packages/mui-material/src/Tabs Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -420,9 +420,14 @@ const Tabs = React.forwardRef(function Tabs(inProps, ref) {
420420 [ size ] : tabMeta ? tabMeta [ size ] : 0 ,
421421 } ;
422422
423- // IE11 support, replace with Number.isNaN
424- // eslint-disable-next-line no-restricted-globals
425- if ( isNaN ( indicatorStyle [ startIndicator ] ) || isNaN ( indicatorStyle [ size ] ) ) {
423+ if (
424+ ! (
425+ typeof indicatorStyle [ startIndicator ] === 'number' &&
426+ ! Number . isNaN ( indicatorStyle [ startIndicator ] ) &&
427+ typeof indicatorStyle [ size ] === 'number' &&
428+ ! Number . isNaN ( indicatorStyle [ size ] )
429+ )
430+ ) {
426431 setIndicatorStyle ( newIndicatorStyle ) ;
427432 } else {
428433 const dStart = Math . abs ( indicatorStyle [ startIndicator ] - newIndicatorStyle [ startIndicator ] ) ;
You can’t perform that action at this time.
0 commit comments