From ed83202307ebb1c535c12bb9a22b9a0000fdfb00 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 8 May 2020 00:37:33 +0200 Subject: [PATCH] repl: remove obsolete completer variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is also assigned in readline. There is not need to assign the variable twice. Signed-off-by: Ruben Bridgewater PR-URL: https://github.com/nodejs/node/pull/33294 Reviewed-By: Anna Henningsen Reviewed-By: Michaƫl Zasso Reviewed-By: James M Snell --- lib/repl.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index b65e16bec2694d..49baebf5eb8114 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -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