Skip to content

Commit

Permalink
Only need to reset in DEV since we only set in DEV
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed May 12, 2022
1 parent 0399504 commit 3eb73f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions packages/react-reconciler/src/ReactFiberNewContext.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export function popProvider(
} else {
context._currentValue = currentValue;
}
context._currentRenderer = null;
if (__DEV__) {
context._currentRenderer = null;
}
} else {
if (
enableServerContext &&
Expand All @@ -151,7 +153,9 @@ export function popProvider(
} else {
context._currentValue2 = currentValue;
}
context._currentRenderer2 = null;
if (__DEV__) {
context._currentRenderer2 = null;
}
}
}

Expand Down
8 changes: 6 additions & 2 deletions packages/react-reconciler/src/ReactFiberNewContext.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ export function popProvider(
} else {
context._currentValue = currentValue;
}
context._currentRenderer = null;
if (__DEV__) {
context._currentRenderer = null;
}
} else {
if (
enableServerContext &&
Expand All @@ -151,7 +153,9 @@ export function popProvider(
} else {
context._currentValue2 = currentValue;
}
context._currentRenderer2 = null;
if (__DEV__) {
context._currentRenderer2 = null;
}
}
}

Expand Down

0 comments on commit 3eb73f2

Please sign in to comment.