Permalink
Browse files

Fixed callbacks

  • Loading branch information...
masylum committed Nov 14, 2010
1 parent 7700ba0 commit df5425fd9360747d8cb43280a47925e70b5dd01e
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/twitter_client.js
View
@@ -32,12 +32,12 @@ module.exports = function (api_key, api_secret, redirect) {
requestCallback = function (callback) {
return function (error, data, response) {
if (error) {
- callback(error);
+ callback(error, null);
} else {
try {
- callback(JSON.parse(data));
+ callback(null, JSON.parse(data));
} catch (exc) {
- callback(exc);
+ callback(exc, null);
}
}
};

0 comments on commit df5425f

Please sign in to comment.