Skip to content

Commit

Permalink
readline: fix permanent deoptimizations
Browse files Browse the repository at this point in the history
PR-URL: #12456
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
mscdex authored and evanlucas committed May 2, 2017
1 parent 31874a7 commit d411dd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down

0 comments on commit d411dd0

Please sign in to comment.