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>
This commit is contained in:
Brian White authored and Evan Lucas committed 2017-05-02 20:39:20 -05:00
1 parent 4a082889bd
commit 1ac331b29f
1 file changed
+2 -2
+2 -2
View File
@@ -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));
}