repl: remove obsolete completer variable

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: https://github.com/nodejs/node/pull/33294
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Ruben Bridgewater authored and Michaël Zasso committed 2020-05-16 10:53:58 +02:00
1 parent e11b5d3d7d
commit ee176f1205
1 file changed
+1 -5
+1 -5
View File
@@ -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);
@@ -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