Skip to content

Commit

Permalink
don't try to parse null response. closes sintaxi#56
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Nov 9, 2013
1 parent 83c4252 commit 7f75514
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/dbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ exports.app = function(config){

return request(opts, function(e, r, b){
var status = e ? null : r.statusCode
var output = helpers.parseJSON(b)
var output = b ? helpers.parseJSON(b) : null;

if(typeof reset == 'undefined'){
if(typeof reset == 'undefined' && output){
reset = output.reset
}

Expand Down

0 comments on commit 7f75514

Please sign in to comment.