Skip to content

Commit

Permalink
opt: optimize the judgement of supportsHydration
Browse files Browse the repository at this point in the history
  • Loading branch information
zh-lx committed Apr 6, 2022
1 parent af73043 commit d794802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.new.js
Expand Up @@ -1399,7 +1399,7 @@ function updateHostRoot(current, workInProgress, renderLanes) {
} else {
// The outermost shell has not hydrated yet. Start hydrating.
enterHydrationState(workInProgress);
if (enableUseMutableSource && supportsHydration) {
if (enableUseMutableSource) {
const mutableSourceEagerHydrationData =
root.mutableSourceEagerHydrationData;
if (mutableSourceEagerHydrationData != null) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-reconciler/src/ReactFiberBeginWork.old.js
Expand Up @@ -1399,7 +1399,7 @@ function updateHostRoot(current, workInProgress, renderLanes) {
} else {
// The outermost shell has not hydrated yet. Start hydrating.
enterHydrationState(workInProgress);
if (enableUseMutableSource && supportsHydration) {
if (enableUseMutableSource) {
const mutableSourceEagerHydrationData =
root.mutableSourceEagerHydrationData;
if (mutableSourceEagerHydrationData != null) {
Expand Down

0 comments on commit d794802

Please sign in to comment.