We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2828147 commit 7fdc21fCopy full SHA for 7fdc21f
lib/internal/webstreams/readablestream.js
@@ -1374,8 +1374,8 @@ function readableStreamPipeTo(
1374
preventCancel,
1375
signal) {
1376
1377
- const sourceStreamBase = source[kStreamBase];
1378
- const destStreamBase = dest[kStreamBase];
+ const sourceStreamBase = source?.[kStreamBase];
+ const destStreamBase = dest?.[kStreamBase];
1379
1380
if (sourceStreamBase !== undefined &&
1381
destStreamBase !== undefined &&
@@ -1395,7 +1395,7 @@ function readableStreamPipeTo(
1395
};
1396
pipe.start();
1397
} catch (error) {
1398
- return PromiseReject(error);
+ promise.reject(error);
1399
}
1400
1401
return promise.promise;
0 commit comments