Skip to content

Commit f5cfcb6

Browse files
committed
chore: fix JavaScript lint errors (issue #7350)
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: passed - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent ee08533 commit f5cfcb6

File tree

1 file changed

+2
-7
lines changed
  • lib/node_modules/@stdlib/utils/async/parallel/lib

1 file changed

+2
-7
lines changed

lib/node_modules/@stdlib/utils/async/parallel/lib/limit.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function limit( fcns, opts, done ) {
5454
len = fcns.length;
5555
debug( 'Number of functions: %d', len );
5656

57-
out = new Array( len );
57+
out = [];
5858
if ( len < opts.limit ) {
5959
lim = len;
6060
} else {
@@ -77,13 +77,8 @@ function limit( fcns, opts, done ) {
7777
* @private
7878
*/
7979
function next() {
80-
var i;
81-
8280
idx += 1;
8381

84-
// Cache the current index value to allow storing results later:
85-
i = idx;
86-
8782
fcns[ idx ].call( opts.thisArg, resolve );
8883

8984
/**
@@ -103,7 +98,7 @@ function limit( fcns, opts, done ) {
10398
flg = true;
10499
return clbk( error );
105100
}
106-
out[ i ] = results;
101+
out.push( results);
107102
clbk();
108103
}
109104
}

0 commit comments

Comments
 (0)