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 Nov 20, 2021
1 parent 7cf5855 commit e9bd500
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 @@ -133,10 +133,14 @@ export function popProvider(
pop(valueCursor, providerFiber);
if (isPrimaryRenderer) {
context._currentValue = currentValue;
context._currentRenderer = null;
if (__DEV__) {
context._currentRenderer = null;
}
} 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 @@ -133,10 +133,14 @@ export function popProvider(
pop(valueCursor, providerFiber);
if (isPrimaryRenderer) {
context._currentValue = currentValue;
context._currentRenderer = null;
if (__DEV__) {
context._currentRenderer = null;
}
} else {
context._currentValue2 = currentValue;
context._currentRenderer2 = null;
if (__DEV__) {
context._currentRenderer2 = null;
}
}
}

Expand Down

0 comments on commit e9bd500

Please sign in to comment.