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 codebytere committed May 16, 2020
1 parent db7bb94 commit ed83202
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/repl.js
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 ed83202

Please sign in to comment.