From e9c02c6762dd5fe9664e5972b8e6307e6da8e68f 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 b2859ea3d28..879e5ddb53f 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -686,7 +686,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;