Skip to content

Commit

Permalink
stream: remove useless if test in transform
Browse files Browse the repository at this point in the history
PR-URL: nodejs#4617
Reviewed-By: Roman Reiss <me@silverwind.io>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Brian White <mscdex@mscdex.net>
  • Loading branch information
zoubin authored and Myles Borins committed Feb 11, 2016
1 parent acee468 commit c022951
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/_stream_transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ function afterTransform(stream, er, data) {
if (data !== null && data !== undefined)
stream.push(data);

if (cb)
cb(er);
cb(er);

var rs = stream._readableState;
rs.reading = false;
Expand Down

0 comments on commit c022951

Please sign in to comment.