Skip to content

Commit 6f72646

Browse files
authored
Just check Consumer. Good enough!
1 parent f4262b8 commit 6f72646

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/components/connectAdvanced.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import hoistStatics from 'hoist-non-react-statics'
22
import invariant from 'invariant'
33
import React, { Component, PureComponent } from 'react'
4-
import {
5-
isValidElementType,
6-
isContextConsumer,
7-
isContextProvider
8-
} from 'react-is'
4+
import { isValidElementType, isContextConsumer } from 'react-is'
95

106
import { ReactReduxContext } from './Context'
117

@@ -219,7 +215,6 @@ export default function connectAdvanced(
219215
render() {
220216
const ContextToUse =
221217
this.props.context &&
222-
isContextProvider(this.props.context.Provider) &&
223218
isContextConsumer(this.props.context.Consumer)
224219
? this.props.context
225220
: Context

0 commit comments

Comments
 (0)