Skip to content

Commit

Permalink
readline: simplify condition, accept any falsy value for undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed May 24, 2015
1 parent 48b5e5d commit 0b61cd5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/readline.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ function Interface(input, output, completer, terminal) {
}
historySize = historySize || kHistorySize;

completer = completer || undefined;

if (typeof completer !== 'function' && typeof completer !== 'undefined') {
if (completer && typeof completer !== 'function') {
throw new TypeError('Argument \'completer\' must be a function');
}

Expand Down

0 comments on commit 0b61cd5

Please sign in to comment.