summaryrefslogtreecommitdiff
path: root/lib/internal/streams
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2019-11-23 10:09:05 +0100
committerMichaël Zasso <targos@protonmail.com>2019-11-27 19:29:01 +0100
commit141a6e34eed05577edf43ad085a74f330d0559cb (patch)
tree1d66ed917d299069b79d34abe1493d18dcb5e138 /lib/internal/streams
parent5904dfcc9c70b79971ab09dacd711e5c13d7120c (diff)
downloadandroid-node-v8-141a6e34eed05577edf43ad085a74f330d0559cb.tar.gz
android-node-v8-141a6e34eed05577edf43ad085a74f330d0559cb.tar.bz2
android-node-v8-141a6e34eed05577edf43ad085a74f330d0559cb.zip
lib: enforce use of Array from primordials
PR-URL: https://github.com/nodejs/node/pull/30635 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'lib/internal/streams')
-rw-r--r--lib/internal/streams/pipeline.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/internal/streams/pipeline.js b/lib/internal/streams/pipeline.js
index 798745a110..0c46460510 100644
--- a/lib/internal/streams/pipeline.js
+++ b/lib/internal/streams/pipeline.js
@@ -3,6 +3,10 @@
'use strict';
+const {
+ ArrayIsArray,
+} = primordials;
+
let eos;
const { once } = require('internal/util');
@@ -65,7 +69,7 @@ function popCallback(streams) {
function pipeline(...streams) {
const callback = popCallback(streams);
- if (Array.isArray(streams[0])) streams = streams[0];
+ if (ArrayIsArray(streams[0])) streams = streams[0];
if (streams.length < 2) {
throw new ERR_MISSING_ARGS('streams');