File tree Expand file tree Collapse file tree
packages/react-dom/src/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111import { getCurrentFiberOwnerNameInDevOrNull } from 'react-reconciler/src/ReactCurrentFiber' ;
1212import { registrationNameModules } from 'events/EventPluginRegistry' ;
1313import warning from 'shared/warning' ;
14+ import { canUseDOM } from 'shared/ExecutionEnvironment' ;
1415import warningWithoutStack from 'shared/warningWithoutStack' ;
1516
1617import * as DOMPropertyOperations from './DOMPropertyOperations' ;
@@ -103,7 +104,7 @@ if (__DEV__) {
103104 // normalized. Since it only affects IE, we're skipping style warnings
104105 // in that browser completely in favor of doing all that work.
105106 // See https://github.com/facebook/react/issues/11807
106- canDiffStyleForHydrationWarning = ! document . documentMode ;
107+ canDiffStyleForHydrationWarning = canUseDOM && ! document . documentMode ;
107108
108109 // HTML parsing normalizes CR and CRLF to LF.
109110 // It also can turn \u0000 into \uFFFD inside attributes.
You can’t perform that action at this time.
0 commit comments