Skip to content

Commit d794802

Browse files
committed
opt: optimize the judgement of supportsHydration
1 parent af73043 commit d794802

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/react-reconciler/src/ReactFiberBeginWork.new.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ function updateHostRoot(current, workInProgress, renderLanes) {
13991399
} else {
14001400
// The outermost shell has not hydrated yet. Start hydrating.
14011401
enterHydrationState(workInProgress);
1402-
if (enableUseMutableSource && supportsHydration) {
1402+
if (enableUseMutableSource) {
14031403
const mutableSourceEagerHydrationData =
14041404
root.mutableSourceEagerHydrationData;
14051405
if (mutableSourceEagerHydrationData != null) {

packages/react-reconciler/src/ReactFiberBeginWork.old.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1399,7 +1399,7 @@ function updateHostRoot(current, workInProgress, renderLanes) {
13991399
} else {
14001400
// The outermost shell has not hydrated yet. Start hydrating.
14011401
enterHydrationState(workInProgress);
1402-
if (enableUseMutableSource && supportsHydration) {
1402+
if (enableUseMutableSource) {
14031403
const mutableSourceEagerHydrationData =
14041404
root.mutableSourceEagerHydrationData;
14051405
if (mutableSourceEagerHydrationData != null) {

0 commit comments

Comments
 (0)