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.
This commit is contained in:
Sebastian Markbåge 2018-05-16 17:31:56 -07:00 committed by GitHub
parent 2ace49362a
commit d4123b4784
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -45,7 +45,8 @@ export default function(stack: Stack, isPrimaryRenderer: boolean) {
context._changedBits = providerFiber.stateNode;
if (__DEV__) {
warning(
context._currentRenderer === null ||
context._currentRenderer === undefined ||
context._currentRenderer === null ||
context._currentRenderer === rendererSigil,
'Detected multiple renderers concurrently rendering the ' +
'same context provider. This is currently unsupported.',
@ -61,7 +62,8 @@ export default function(stack: Stack, isPrimaryRenderer: boolean) {
context._changedBits2 = providerFiber.stateNode;
if (__DEV__) {
warning(
context._currentRenderer2 === null ||
context._currentRenderer2 === undefined ||
context._currentRenderer2 === null ||
context._currentRenderer2 === rendererSigil,
'Detected multiple renderers concurrently rendering the ' +
'same context provider. This is currently unsupported.',