Skip to content

Commit

Permalink
fix #80
Browse files Browse the repository at this point in the history
  • Loading branch information
nkzawa committed Dec 7, 2015
1 parent 1cf6ce8 commit 3124d2b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ function adapter(uri, opts){
var self = this;
var rooms = this.sids[id];

if (!rooms) return process.nextTick(fn.bind(null, null));
if (!rooms) {
if (fn) process.nextTick(fn.bind(null, null));
return;
}

async.forEach(Object.keys(rooms), function(room, next){
if (rooms.hasOwnProperty(room)) {
Expand Down

0 comments on commit 3124d2b

Please sign in to comment.