Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

shift successful get/post callback into try block

  • Loading branch information...
commit 8dbb12d2c7c208193229cb4fda2f6e5626218149 1 parent 0f98687
@jdub authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/node-twitter/index.js
View
4 lib/node-twitter/index.js
@@ -81,10 +81,10 @@ Twitter.prototype.get = function(url, params, callback) {
} else {
try {
var json = JSON.parse(data);
+ callback(json);
} catch(error) {
callback(error);
}
- callback(json);
}
});
return this;
@@ -119,10 +119,10 @@ Twitter.prototype.post = function(url, content, content_type, callback) {
} else {
try {
var json = JSON.parse(data);
+ callback(json);
} catch(error) {
callback(error);
}
- callback(json);
}
});
return this;
Please sign in to comment.
Something went wrong with that request. Please try again.