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:
parent
3c098ee7e2
commit
4484e8f7e2
@ -470,8 +470,8 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If there is a common prefix to all matches, then apply that portion.
|
// If there is a common prefix to all matches, then apply that portion.
|
||||||
const f = completions.filter(function(e) { if (e) return e; });
|
var f = completions.filter(function(e) { if (e) return e; });
|
||||||
const prefix = commonPrefix(f);
|
var prefix = commonPrefix(f);
|
||||||
if (prefix.length > completeOn.length) {
|
if (prefix.length > completeOn.length) {
|
||||||
self._insertString(prefix.slice(completeOn.length));
|
self._insertString(prefix.slice(completeOn.length));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user