Skip to content
Browse files

move callback out of try block in twitter.post

  • Loading branch information...
1 parent 6534ba0 commit ef03b15ffe7fe4b791fd9ecae571f6b5569a985c @hdachev hdachev committed with Jun 5, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/twitter.js
View
4 lib/twitter.js
@@ -138,11 +138,11 @@ Twitter.prototype.post = function(url, content, content_type, callback) {
else {
try {
var json = JSON.parse(data);
- callback(null, json);
}
catch(err) {
- callback(err);
+ return callback(err);
}
+ callback(null, json);
}
});
return this;

0 comments on commit ef03b15

Please sign in to comment.
Something went wrong with that request. Please try again.