Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4131f94

Browse filesBrowse files
Ayase-252danielleadams
authored andcommitted
stream: allow empty string as source of pipeline
Fixes: #38721 PR-URL: #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>
1 parent 496f7ea commit 4131f94
Copy full SHA for 4131f94

File tree

Expand file treeCollapse file tree

2 files changed

+19
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+19
-1
lines changed
Open diff view settings
Collapse file

‎lib/internal/streams/utils.js‎

Copy file name to clipboardExpand all lines: lib/internal/streams/utils.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function isStream(obj) {
2020
}
2121

2222
function isIterable(obj, isAsync) {
23-
if (!obj) return false;
23+
if (obj == null) return false;
2424
if (isAsync === true) return typeof obj[SymbolAsyncIterator] === 'function';
2525
if (isAsync === false) return typeof obj[SymbolIterator] === 'function';
2626
return typeof obj[SymbolAsyncIterator] === 'function' ||
Collapse file
+18Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
'use strict';
2+
3+
const common = require('../common');
4+
const {
5+
pipeline,
6+
PassThrough
7+
} = require('stream');
8+
9+
10+
async function runTest() {
11+
await pipeline(
12+
'',
13+
new PassThrough({ objectMode: true }),
14+
common.mustCall(() => { })
15+
);
16+
}
17+
18+
runTest().then(common.mustCall(() => {}));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.