Skip to content

Commit ed83202

Browse files
BridgeARcodebytere
authored andcommitted
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 <[email protected]> PR-URL: #33294 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent db7bb94 commit ed83202

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

lib/repl.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -647,10 +647,6 @@ function REPLServer(prompt,
647647
enumerable: true
648648
});
649649

650-
// Figure out which "complete" function to use.
651-
self.completer = (typeof options.completer === 'function') ?
652-
options.completer : completer;
653-
654650
function completer(text, cb) {
655651
complete.call(self, text, self.editorMode ?
656652
self.completeOnEditorMode(cb) : cb);
@@ -659,7 +655,7 @@ function REPLServer(prompt,
659655
Interface.call(this, {
660656
input: options.input,
661657
output: options.output,
662-
completer: self.completer,
658+
completer: options.completer || completer,
663659
terminal: options.terminal,
664660
historySize: options.historySize,
665661
prompt

0 commit comments

Comments
 (0)