File tree 1 file changed +2
-1
lines changed
packages/mui-system/src/cssVars 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as React from 'react';
2
2
import PropTypes from 'prop-types' ;
3
3
import { GlobalStyles } from '@mui/styled-engine' ;
4
4
import { useTheme as muiUseTheme } from '@mui/private-theming' ;
5
+ import useEnhancedEffect from '@mui/utils/useEnhancedEffect' ;
5
6
import ThemeProvider from '../ThemeProvider' ;
6
7
import InitColorSchemeScript , {
7
8
DEFAULT_COLOR_SCHEME_STORAGE_KEY ,
@@ -173,7 +174,7 @@ export default function createCssVarsProvider(options) {
173
174
// 5. Declaring effects
174
175
// 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.
175
176
const colorSchemeSelector = restThemeProp . colorSchemeSelector ;
176
- React . useEffect ( ( ) => {
177
+ useEnhancedEffect ( ( ) => {
177
178
if (
178
179
colorScheme &&
179
180
colorSchemeNode &&
You can’t perform that action at this time.
0 commit comments