diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-05-09 14:46:02 -0700 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-05-23 19:39:43 +0200 |
commit | c0d858f8bb8ba5212548da2fba6a7bc02db0462b (patch) | |
tree | 99f043ec5aec3f5150a2aed0f62597234b158140 /deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js | |
parent | 994617370e8e66f3ea9488fec32fd912e7902396 (diff) | |
download | android-node-v8-c0d858f8bb8ba5212548da2fba6a7bc02db0462b.tar.gz android-node-v8-c0d858f8bb8ba5212548da2fba6a7bc02db0462b.tar.bz2 android-node-v8-c0d858f8bb8ba5212548da2fba6a7bc02db0462b.zip |
deps: upgrade npm beta to 5.0.0-beta.56
PR-URL: https://github.com/nodejs/node/pull/12936
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js')
-rw-r--r-- | deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js b/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js index f92fc19fef..b3a9068634 100644 --- a/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js +++ b/deps/npm/node_modules/mississippi/node_modules/end-of-stream/index.js @@ -27,21 +27,21 @@ var eos = function(stream, opts, callback) { var onfinish = function() { writable = false; - if (!readable) callback(); + if (!readable) callback.call(stream); }; var onend = function() { readable = false; - if (!writable) callback(); + if (!writable) callback.call(stream); }; var onexit = function(exitCode) { - callback(exitCode ? new Error('exited with error code: ' + exitCode) : null); + callback.call(stream, exitCode ? new Error('exited with error code: ' + exitCode) : null); }; var onclose = function() { - if (readable && !(rs && rs.ended)) return callback(new Error('premature close')); - if (writable && !(ws && ws.ended)) return callback(new Error('premature close')); + if (readable && !(rs && rs.ended)) return callback.call(stream, new Error('premature close')); + if (writable && !(ws && ws.ended)) return callback.call(stream, new Error('premature close')); }; var onrequest = function() { @@ -80,4 +80,4 @@ var eos = function(stream, opts, callback) { }; }; -module.exports = eos;
\ No newline at end of file +module.exports = eos; |