diff options
author | Qingyu Deng <bitdqy@hotmail.com> | 2021-05-18 18:30:13 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2021-05-31 22:34:48 +0300 |
commit | 4131f94ca84b7ad536794508c41c7c2014e5816e (patch) | |
tree | 3cac092ec9d316f69412632e6e777c5e56315670 /lib | |
parent | 496f7eae925a3a6174b167ceec4e5c2bc815e911 (diff) |
stream: allow empty string as source of pipeline
Fixes: https://github.com/nodejs/node/issues/38721
PR-URL: https://github.com/nodejs/node/pull/38723
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/internal/streams/utils.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/internal/streams/utils.js b/lib/internal/streams/utils.js index b6e74425079..62eea022685 100644 --- a/lib/internal/streams/utils.js +++ b/lib/internal/streams/utils.js @@ -20,7 +20,7 @@ function isStream(obj) { } function isIterable(obj, isAsync) { - if (!obj) return false; + if (obj == null) return false; if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function'; if (isAsync === false) return typeof obj[SymbolIterator] === 'function'; return typeof obj[SymbolAsyncIterator] === 'function' || |