Skip to content

Commit 4b46a3a

Browse files
authored
Update main.js
Issue: Using new Array() violates the stdlib/no-new-array rule. Signed-off-by: VEER RAJ <[email protected]>
1 parent 57efa3d commit 4b46a3a

File tree

1 file changed

+2
-1
lines changed
  • lib/node_modules/@stdlib/utils/async/if-then/lib

1 file changed

+2
-1
lines changed

lib/node_modules/@stdlib/utils/async/if-then/lib/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ function ifthenAsync( predicate, x, y, done ) {
119119
return done( error );
120120
}
121121
nargs = arguments.length;
122-
args = new Array( nargs );
122+
const args = [];
123+
args.length = nargs;
123124
args[ 0 ] = null;
124125
for ( i = 1; i < nargs; i++ ) {
125126
args[ i ] = arguments[ i ];

0 commit comments

Comments
 (0)