Skip to content

Commit

Permalink
Fix for when res2 is nothing
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Oct 9, 2015
1 parent 5a0dcd7 commit f029d0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ function RingpopServer(ringpop, tchannel) {
self.ringpop.logger.warn(err.message, err);
res.sendNotOk(null, err.message);
} else {
res2 = Buffer.isBuffer(res2) ? res2 : new Buffer(res2);
if (res2 && !Buffer.isBuffer(res2)) {
res2 = new Buffer(res2);
}

res.sendOk(res1, res2);
}
}
Expand Down

0 comments on commit f029d0b

Please sign in to comment.