diff options
author | Brian White <mscdex@mscdex.net> | 2017-04-24 02:21:30 -0400 |
---|---|---|
committer | Evan Lucas <evanlucas@me.com> | 2017-05-02 20:39:20 -0500 |
commit | 1ac331b29fc0d0eab4fdfd6e47155b2936e8f100 (patch) | |
tree | 17a8f93eba83a5dafbdb4baa06cfa89395a7d8d1 | |
parent | 4a082889bd6d29512d462425fe21752b442071a2 (diff) | |
download | node-new-1ac331b29fc0d0eab4fdfd6e47155b2936e8f100.tar.gz |
readline: fix permanent deoptimizations
PR-URL: https://github.com/nodejs/node/pull/12456
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
-rw-r--r-- | lib/readline.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/readline.js b/lib/readline.js index 0590b1c299..710fc77be6 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -449,8 +449,8 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) { } // If there is a common prefix to all matches, then apply that portion. - const f = completions.filter(function(e) { if (e) return e; }); - const prefix = commonPrefix(f); + var f = completions.filter(function(e) { if (e) return e; }); + var prefix = commonPrefix(f); if (prefix.length > completeOn.length) { self._insertString(prefix.slice(completeOn.length)); } |