From 860c0529e50f0c38d10175727ffdaa5b71bd0793 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 8ff428e11ffed0..eec442226252af 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;