From ce9c93cac036f6ad702f939270ff5e137da41404 Mon Sep 17 00:00:00 2001 From: zoubin Date: Mon, 11 Jan 2016 17:22:53 +0800 Subject: [PATCH] stream: remove useless if test in transform PR-URL: https://github.com/nodejs/node/pull/4617 Reviewed-By: Roman Reiss Reviewed-By: Colin Ihrig Reviewed-By: Brian White --- lib/_stream_transform.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index 1378c0c676e4ba..d58f112acfb95a 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -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;