Skip to content

Commit ecc8370

Browse files
committed
Fix: replace new Array() with array literal in ndarray test
- Replace 'new Array(shape.length+1)' with array literal and length assignment - Fixes stdlib/no-new-array linting error in test.instance.set_nd.js - Maintains same functionality while adhering to project coding standards - Resolves JavaScript linting failure detected in CI workflow
1 parent 6006497 commit ecc8370

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/node_modules/@stdlib/ndarray/ctor/test/test.instance.set_nd.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ tape( 'an ndarray constructor returns an instance which has a `set` method which
7575

7676
function badValue( value, dim ) {
7777
return function badValue() {
78-
var args = new Array( shape.length+1 );
78+
var args;
7979
var i;
8080

81+
args = [];
82+
args.length = shape.length+1;
8183
for ( i = 0; i < shape.length; i++ ) {
8284
if ( i === dim ) {
8385
args[ i ] = value;

0 commit comments

Comments
 (0)