diff --git a/lib/readline.js b/lib/readline.js index 4df60afce8b429..9b9a054fd66fb7 100644 --- a/lib/readline.js +++ b/lib/readline.js @@ -500,9 +500,7 @@ Interface.prototype._tabComplete = function(lastKeypressWasTab) { } // If there is a common prefix to all matches, then apply that portion. - var f = completions.filter(function completionFilter(e) { - if (e) return e; - }); + var f = completions.filter((e) => e); var prefix = commonPrefix(f); if (prefix.length > completeOn.length) { self._insertString(prefix.slice(completeOn.length));