Skip to content

Commit

Permalink
repl: remove obsolete completer variable
Browse files Browse the repository at this point in the history
It is also assigned in readline. There is not need to assign the
variable twice.

Signed-off-by: Ruben Bridgewater <ruben@bridgewater.de>

PR-URL: #33294
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
BridgeAR authored and targos committed May 16, 2020
1 parent e11b5d3 commit ee176f1
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -647,10 +647,6 @@ function REPLServer(prompt,
enumerable: true
});

// Figure out which "complete" function to use.
self.completer = (typeof options.completer === 'function') ?
options.completer : completer;

function completer(text, cb) {
complete.call(self, text, self.editorMode ?
self.completeOnEditorMode(cb) : cb);
Expand All @@ -659,7 +655,7 @@ function REPLServer(prompt,
Interface.call(this, {
input: options.input,
output: options.output,
completer: self.completer,
completer: options.completer || completer,
terminal: options.terminal,
historySize: options.historySize,
prompt
Expand Down

0 comments on commit ee176f1

Please sign in to comment.