0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 15:30:56 +01:00

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 2020-05-08 00:37:33 +02:00 committed by Michaël Zasso
parent e11b5d3d7d
commit ee176f1205
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600

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