Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repl: declare for initial expression in the for loop, instead of hoisting and re-using #29535

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
repl: add missing variable declaration
* Adds a  to a variable declaration in a for loop
  that wasn't using anything.
  • Loading branch information
lholmquist committed Sep 12, 2019
commit 5a6719f2239bf5846ee1e085e6002972307cdedf
2 changes: 1 addition & 1 deletion lib/repl.js
Original file line number Diff line number Diff line change
Expand Up @@ -1332,7 +1332,7 @@ function complete(line, callback) {
// Completion group 0 is the "closest"
// (least far up the inheritance chain)
// so we put its completions last: to be closest in the REPL.
for (i = 0; i < completionGroups.length; i++) {
for (let i = 0; i < completionGroups.length; i++) {
group = completionGroups[i];
group.sort();
for (var j = group.length - 1; j >= 0; j--) {
Expand Down