File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
packages/mui-material/src/Tabs Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,10 @@ const defaultIndicatorStyle = {};
285
285
286
286
let warnedOnceTabPresent = false ;
287
287
288
+ function createMap ( ) {
289
+ return new Map ( ) ;
290
+ }
291
+
288
292
const Tabs = React . forwardRef ( function Tabs ( inProps , ref ) {
289
293
const props = useDefaultProps ( { props : inProps , name : 'MuiTabs' } ) ;
290
294
const theme = useTheme ( ) ;
@@ -376,7 +380,7 @@ const Tabs = React.forwardRef(function Tabs(inProps, ref) {
376
380
scrollbarWidth : 0 ,
377
381
} ) ;
378
382
379
- const valueToIndex = useLazyRef ( ( ) => new Map ( ) ) . current ;
383
+ const valueToIndex = useLazyRef ( createMap ) . current ;
380
384
const tabsRef = React . useRef ( null ) ;
381
385
const tabListRef = React . useRef ( null ) ;
382
386
const childIndexRef = React . useRef ( 0 ) ;
You can’t perform that action at this time.
0 commit comments