File tree Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Expand file tree Collapse file tree 3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ class AsyncLogicEngine {
173173 // END OPTIMIZER BLOCK //
174174
175175 if ( Array . isArray ( logic ) ) {
176- const res = [ ]
176+ const res = new Array ( logic . length )
177177 // Note: In the past, it used .map and Promise.all; this can be changed in the future
178178 // if we want it to run concurrently.
179- for ( let i = 0 ; i < logic . length ; i ++ ) res . push ( await this . run ( logic [ i ] , data , { above } ) )
179+ for ( let i = 0 ; i < logic . length ; i ++ ) res [ i ] = await this . run ( logic [ i ] , data , { above } )
180180 return res
181181 }
182182
Original file line number Diff line number Diff line change @@ -154,8 +154,8 @@ class LogicEngine {
154154 // END OPTIMIZER BLOCK //
155155
156156 if ( Array . isArray ( logic ) ) {
157- const res = [ ]
158- for ( let i = 0 ; i < logic . length ; i ++ ) res . push ( this . run ( logic [ i ] , data , { above } ) )
157+ const res = new Array ( logic . length )
158+ for ( let i = 0 ; i < logic . length ; i ++ ) res [ i ] = this . run ( logic [ i ] , data , { above } )
159159 return res
160160 }
161161
Original file line number Diff line number Diff line change 33 * Coerces a value into an array.
44 * This is used for unary value operations.
55 */
6- export function coerceArray ( value , skip = false ) {
7- if ( skip ) return value
6+ export function coerceArray ( value ) {
87 return Array . isArray ( value ) ? value : [ value ]
98}
You can’t perform that action at this time.
0 commit comments