From 36afa8a844f8dc9fc50bf6ee4da3fc55e900d9b1 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Mon, 11 Feb 2013 16:50:39 -0500 Subject: [PATCH] json_request always pass response, even if empty --- api.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api.coffee b/api.coffee index 318531f..156e91c 100644 --- a/api.coffee +++ b/api.coffee @@ -142,8 +142,8 @@ json_request = (method, path, data, token, callback) -> data = JSON.stringify data request method, path, 'application/json', data, token, (err, response) -> return callback err if err - return callback() if response is ' ' - return callback() if response is '' + return callback null, '' if response is ' ' + return callback null, '' if response is '' try callback null, JSON.parse(response) catch error -- 1.7.10.4