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:
parent
e11b5d3d7d
commit
ee176f1205
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user