Skip to content

Commit e9bd500

Browse files
committed
Only need to reset in DEV since we only set in DEV
1 parent 7cf5855 commit e9bd500

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,14 @@ export function popProvider(
133133
pop(valueCursor, providerFiber);
134134
if (isPrimaryRenderer) {
135135
context._currentValue = currentValue;
136-
context._currentRenderer = null;
136+
if (__DEV__) {
137+
context._currentRenderer = null;
138+
}
137139
} else {
138140
context._currentValue2 = currentValue;
139-
context._currentRenderer2 = null;
141+
if (__DEV__) {
142+
context._currentRenderer2 = null;
143+
}
140144
}
141145
}
142146

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,14 @@ export function popProvider(
133133
pop(valueCursor, providerFiber);
134134
if (isPrimaryRenderer) {
135135
context._currentValue = currentValue;
136-
context._currentRenderer = null;
136+
if (__DEV__) {
137+
context._currentRenderer = null;
138+
}
137139
} else {
138140
context._currentValue2 = currentValue;
139-
context._currentRenderer2 = null;
141+
if (__DEV__) {
142+
context._currentRenderer2 = null;
143+
}
140144
}
141145
}
142146

0 commit comments

Comments
 (0)