Skip to content

Commit

Permalink
Merge pull request balderdashy#726 from freshvolk/master
Browse files Browse the repository at this point in the history
Check that socket object exists before calling subscribe
  • Loading branch information
particlebanana committed Aug 9, 2013
2 parents 4c6862e + 9d6d35b commit a0a54a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/hooks/pubsub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ module.exports = function(sails) {
socket.join( my.room(id) );
});

this.subscribe(socket, id);
if (socket) {
this.subscribe(socket, id);
}
},


Expand Down

0 comments on commit a0a54a1

Please sign in to comment.