Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Commit

Permalink
Fix issue when running under a mixed preact-compat / react environmen…
Browse files Browse the repository at this point in the history
…t that could cause PFCs to receive no props. Fixes #292
  • Loading branch information
developit committed Feb 2, 2017
1 parent 80bed3c commit 71996e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,8 @@ function isStatelessComponent(c) {
function wrapStatelessComponent(WrappedComponent) {
return createClass({
displayName: WrappedComponent.displayName || WrappedComponent.name,
render(props, state, context) {
return WrappedComponent(props, context);
render() {
return WrappedComponent(this.props, this.context);
}
});
}
Expand Down

0 comments on commit 71996e1

Please sign in to comment.