Skip to content

Commit e7c8f45

Browse files
committed
fix: removed new array and use [] instead of that
1 parent da376aa commit e7c8f45

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • lib/node_modules/@stdlib/plot/components/svg/path/lib/render/utils

lib/node_modules/@stdlib/plot/components/svg/path/lib/render/utils/zip.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ function zip( x, y ) {
4040
if ( x.length !== y.length ) {
4141
throw new Error( format( 'invalid arguments. Must provide equal length array-like objects. x length: `%u`. y length: `%u`.', x.length, y.length ) );
4242
}
43-
out = new Array( x.length );
43+
out = []
44+
out.length = x.length;
4445
for ( i = 0; i < x.length; i++ ) {
4546
out[ i ] = [ x[i], y[i] ];
4647
}

0 commit comments

Comments
 (0)