From e8412bc213ccda715431167f872115df5436244c Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 10 Mar 2019 13:01:25 +0800 Subject: [PATCH] repl: remove redundant initialization PR-URL: https://github.com/nodejs/node/pull/26562 Reviewed-By: Ruben Bridgewater Reviewed-By: Luigi Pinca --- lib/repl.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/repl.js b/lib/repl.js index 7f01a426beeacf..2770478e83ce2a 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -1021,8 +1021,7 @@ function complete(line, callback) { // REPL commands (e.g. ".break"). var filter; - var match = null; - match = line.match(/^\s*\.(\w*)$/); + let match = line.match(/^\s*\.(\w*)$/); if (match) { completionGroups.push(Object.keys(this.commands)); completeOn = match[1];