Skip to content

Commit

Permalink
Merge pull request #78 from cerebral/serverLeak
Browse files Browse the repository at this point in the history
fix(server): do not register components with server controller
  • Loading branch information
christianalfoni authored Aug 16, 2016
2 parents b85f420 + 047ca0d commit 94fddc2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ module.exports = function (paths, signals, Component) {
if (!Object.keys(statePaths).length) {
return
}
this.context.cerebral.registerComponent(this, this.getDepsMap(this.props))
if (!this.context.cerebral.controller.isServer) {
this.context.cerebral.registerComponent(this, this.getDepsMap(this.props))
}
},

componentWillReceiveProps: function (nextProps) {
Expand Down

0 comments on commit 94fddc2

Please sign in to comment.