Skip to content

Commit 220f0ed

Browse files
Update main.js
Signed-off-by: Suyash Pathak <[email protected]>
1 parent b3b438a commit 220f0ed

File tree

1 file changed

+5
-5
lines changed
  • lib/node_modules/@stdlib/utils/async/while/lib

1 file changed

+5
-5
lines changed

lib/node_modules/@stdlib/utils/async/while/lib/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ function whileAsync( predicate, fcn, done, thisArg ) {
112112

113113
// Cache the most recent results...
114114
if ( arguments.length > 1 ) {
115-
args = [];
116-
for ( i = 1; i < arguments.length; i++ ) {
117-
args.push( arguments[ i ] );
118-
}
119-
}
115+
args = new Array( arguments.length-1 );
116+
for ( i = 1; i < arguments.length; i++ ) {
117+
args[ i-1 ] = arguments[ i ];
118+
}
119+
}
120120

121121
// Run the test condition:
122122
predicate( idx, onPredicate );

0 commit comments

Comments
 (0)