Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Emit response on end, for user error handling

  • Loading branch information...
commit f48dc6ef94761d0c98657260ce593edba5ac89f5 1 parent 2532b66
@jdub authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/twitter.js
View
5 lib/twitter.js
@@ -231,9 +231,8 @@ Twitter.prototype.stream = function(method, params, callback) {
response.on('error', function(error) {
stream.emit('error', error);
});
- // FIXME: Somehow provide UPDATED chunks of the response when the stream ends, too
- response.on('end', function () {
- stream.emit('end');
+ response.on('end', function() {
+ stream.emit('end', response);
});
});
request.on('error', function(error) {
Please sign in to comment.
Something went wrong with that request. Please try again.