diff --git a/lib/dbox.js b/lib/dbox.js index d39a258..5b32531 100644 --- a/lib/dbox.js +++ b/lib/dbox.js @@ -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 }