Skip to content

Commit d411dd0

Browse files
mscdexevanlucas
authored andcommitted
readline: fix permanent deoptimizations
PR-URL: #12456 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 31874a7 commit d411dd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/readline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) {
449449
}
450450

451451
// If there is a common prefix to all matches, then apply that portion.
452-
const f = completions.filter(function(e) { if (e) return e; });
453-
const prefix = commonPrefix(f);
452+
var f = completions.filter(function(e) { if (e) return e; });
453+
var prefix = commonPrefix(f);
454454
if (prefix.length > completeOn.length) {
455455
self._insertString(prefix.slice(completeOn.length));
456456
}

0 commit comments

Comments
 (0)