Permalink
Browse files

Only store truthy channel values

  • Loading branch information...
1 parent a62ffd6 commit 15a53246382d233ae85511e35da0f263b7d25b10 @scttnlsn committed Jun 29, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −5 lib/index.js
View
@@ -26,13 +26,14 @@ exports.listen = function(server, backends, options) {
var sync = new Sync(backend, socket, options);
socket.on('listen', function(channel, callback) {
- socket.set('channel', channel, function() {
- if (channel) {
+ if (channel) {
+ socket.set('channel', channel, function() {
socket.join(channel);
- }
-
+ callback(options);
+ });
+ } else {
callback(options);
- });
+ }
});
socket.on('sync', function(req, callback) {

0 comments on commit 15a5324

Please sign in to comment.