diff --git a/lib/internal/streams/operators.js b/lib/internal/streams/operators.js index 6db2df0e3646e0..d3ebbce8e920b0 100644 --- a/lib/internal/streams/operators.js +++ b/lib/internal/streams/operators.js @@ -118,7 +118,7 @@ function map(fn, options) { PromisePrototypeThen(val, afterItemProcessed, onCatch); - queue.push(val); + ArrayPrototypePush(queue, val); if (next) { next(); next = null; @@ -130,11 +130,11 @@ function map(fn, options) { }); } } - queue.push(kEof); + ArrayPrototypePush(queue, kEof); } catch (err) { const val = PromiseReject(err); PromisePrototypeThen(val, afterItemProcessed, onCatch); - queue.push(val); + ArrayPrototypePush(queue, val); } finally { done = true; if (next) {