diff options
Diffstat (limited to 'lib/_stream_transform.js')
-rw-r--r-- | lib/_stream_transform.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js index f83620863..d3e7a1348 100644 --- a/lib/_stream_transform.js +++ b/lib/_stream_transform.js @@ -72,7 +72,7 @@ function afterTransform(stream, er, data) { ts.writechunk = null; ts.writecb = null; - if (!util.isNullOrUndefined(data)) + if (data !== null && data !== undefined) stream.push(data); if (cb) @@ -106,7 +106,7 @@ function Transform(options) { this._readableState.sync = false; this.once('prefinish', function() { - if (util.isFunction(this._flush)) + if (typeof this._flush === 'function') this._flush(function(er) { done(stream, er); }); @@ -154,7 +154,7 @@ Transform.prototype._write = function(chunk, encoding, cb) { Transform.prototype._read = function(n) { var ts = this._transformState; - if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { ts.transforming = true; this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); } else { |