Skip to content

Commit fea4b5b

Browse files
authored
chore(plot): replace array pre-allocation with push
PR-URL: #5852 Closes: #5791 Reviewed-by: Philipp Burckhardt <[email protected]> Reviewed-by: Gururaj Gurram <[email protected]>
1 parent ba14f27 commit fea4b5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/node_modules/@stdlib/plot/components/svg/symbols/lib/render/closed_circles.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function render( state ) {
6767
x = state.x;
6868
y = state.y;
6969

70-
out = new Array( x.length );
70+
out = [];
7171
for ( i = 0; i < x.length; i++ ) {
7272
xi = x[ i ];
7373
yi = y[ i ];
@@ -91,7 +91,7 @@ function render( state ) {
9191
}
9292
};
9393
debug( 'Generating a virtual DOM tree (%s) with properties: %s.', ELEMENT, JSON.stringify( props ) );
94-
out[ i ] = h( ELEMENT, props, [] );
94+
out.push( h( ELEMENT, props, [] ) );
9595
}
9696
return out;
9797
}

0 commit comments

Comments
 (0)