Skip to content

Commit 2b5f9b1

Browse files
authored
refactor: avoid initializing array in dictionary mode
Signed-off-by: Athan <[email protected]>
1 parent 5ef17d0 commit 2b5f9b1

File tree

1 file changed

+2
-4
lines changed
  • lib/node_modules/@stdlib/plot/components/svg/clip-path/lib

1 file changed

+2
-4
lines changed

lib/node_modules/@stdlib/plot/components/svg/clip-path/lib/main.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,9 @@ function ClipPath( options ) {
131131
var args;
132132
var i;
133133
debug( 'Received a render event. Re-emitting...' );
134-
args = [];
135-
args.length = arguments.length + 1;
136-
args[ 0 ] = 'render';
134+
args = [ 'render' ];
137135
for ( i = 0; i < arguments.length; i++ ) {
138-
args[ i+1 ] = arguments[ i ];
136+
args.push( arguments[ i ] );
139137
}
140138
self.emit.apply( self, args );
141139
}

0 commit comments

Comments
 (0)