From 61a47da317b116a7e3a9bcc0be8f9e43bb28a174 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 24 Apr 2017 02:20:38 -0400 Subject: [PATCH] stream: fix permanent deoptimizations PR-URL: https://github.com/nodejs/node/pull/12456 Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell --- lib/_stream_readable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index e33441971fe746..8f11e5db2ab7d4 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -669,7 +669,7 @@ Readable.prototype.unpipe = function(dest) { } // try to find the right one. - const index = state.pipes.indexOf(dest); + var index = state.pipes.indexOf(dest); if (index === -1) return this;