Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that component prop 'context' really contains a React context … #1134

Merged
merged 10 commits into from
Jan 8, 2019
Prev Previous commit
Next Next commit
Update connectAdvanced.js
  • Loading branch information
casdevs authored Dec 17, 2018
commit c046ae61cce5d45530d270bc43ce464897127985
4 changes: 3 additions & 1 deletion src/components/connectAdvanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,9 @@ export default function connectAdvanced(
}

render() {
const ContextToUse = this.props.context && this.props.context.Consumer ? this.props.context : Context
const ContextToUse = this.props.context && this.props.context.Consumer
? this.props.context
: Context

return (
<ContextToUse.Consumer>
Expand Down