repl: remove redundant initialization · nodejs/node@e8412bc (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit e8412bc

gengjiawentargos

authored and

committed

repl: remove redundant initialization

PR-URL: #26562Reviewed-By: Ruben Bridgewater ruben@bridgewater.de Reviewed-By: Luigi Pinca luigipinca@gmail.com

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -1021,8 +1021,7 @@ function complete(line, callback) {
1021 1021
1022 1022 // REPL commands (e.g. ".break").
1023 1023 var filter;
1024 -var match = null;
1025 -match = line.match(/^\s*\.(\w*)$/);
1024 +let match = line.match(/^\s*\.(\w*)$/);
1026 1025 if (match) {
1027 1026 completionGroups.push(Object.keys(this.commands));
1028 1027 completeOn = match[1];