From 5205e7260f6082fe567f505be4aa15249c2c74a5 Mon Sep 17 00:00:00 2001 From: Vsevolod Strukchinsky Date: Wed, 28 Oct 2015 21:25:57 +0500 Subject: [PATCH] check for pipe method only See discussion here - https://github.com/form-data/form-data/pull/150#issuecomment-151884281 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 6db2a04..c892f94 100644 --- a/index.js +++ b/index.js @@ -84,7 +84,7 @@ function asCallback(opts, cb) { var ee = requestAsEventEmitter(opts); ee.on('request', function (req) { - if (isStream.readable(opts.body)) { + if (isStream(opts.body)) { opts.body.pipe(req); opts.body = undefined; return;