diff --git a/lib/internal/wrap_js_stream.js b/lib/internal/wrap_js_stream.js index f7d2a376cc5e8b..1c494e57e1f9dd 100644 --- a/lib/internal/wrap_js_stream.js +++ b/lib/internal/wrap_js_stream.js @@ -145,8 +145,8 @@ class JSStreamWrap extends Socket { let pending = bufs.length; this.stream.cork(); - for (const buf of bufs) - this.stream.write(buf, done); + for (var i = 0; i < bufs.length; ++i) + this.stream.write(bufs[i], done); this.stream.uncork(); function done(err) {