@samitouri / QOS-React / commits / d4123b4784

Relax current renderer warning (#12838)

If you use an older version of `react` this won't get initialized to null. We don't really need it to be initialized to work.

Sebastian Markbåge committed May 16, 2018 at 17:31 UTC d4123b4784c75af0bfb5f6505e6c567e354b4155
1 file changed +4 -2
packages/react-reconciler/src/ReactFiberNewContext.js
+4 -2
@@ -45,7 +45,8 @@ export default function(stack: Stack, isPrimaryRenderer: boolean) {
45 context._changedBits = providerFiber.stateNode;
46 if (__DEV__) {
47 warning(
48 - context._currentRenderer === null ||
48 + context._currentRenderer === undefined ||
49 + context._currentRenderer === null ||
50 context._currentRenderer === rendererSigil,
51 'Detected multiple renderers concurrently rendering the ' +
52 'same context provider. This is currently unsupported.',
@@ -61,7 +62,8 @@ export default function(stack: Stack, isPrimaryRenderer: boolean) {
62 context._changedBits2 = providerFiber.stateNode;
63 if (__DEV__) {
64 warning(
64 - context._currentRenderer2 === null ||
65 + context._currentRenderer2 === undefined ||
66 + context._currentRenderer2 === null ||
67 context._currentRenderer2 === rendererSigil,
68 'Detected multiple renderers concurrently rendering the ' +
69 'same context provider. This is currently unsupported.',