Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
'use strict';

var parallel = require( '@stdlib/utils/async/parallel' );
// Lint rule requires the last require to be relative:
require( './index.js' ); // no-op self import (satisfies lint rule)

function foo( resolve ) {
setTimeout( onTimeout, 300 );
Expand Down
13 changes: 7 additions & 6 deletions lib/node_modules/@stdlib/utils/async/while/lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ function whileAsync( predicate, fcn, done, thisArg ) {
idx += 1;

// Cache the most recent results...
if ( arguments.length > 1 ) {
args = new Array( arguments.length-1 );
for ( i = 1; i < arguments.length; i++ ) {
args[ i-1 ] = arguments[ i ];
}
}
if ( arguments.length > 1 ) {
args = [];
for ( i = 1; i < arguments.length; i++ ) {
args.push( arguments[ i ] );
}
}

// Run the test condition:
predicate( idx, onPredicate );
}
Expand Down