File tree 3 files changed +5
-6
lines changed
3 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -173,10 +173,10 @@ class AsyncLogicEngine {
173
173
// END OPTIMIZER BLOCK //
174
174
175
175
if ( Array . isArray ( logic ) ) {
176
- const res = [ ]
176
+ const res = new Array ( logic . length )
177
177
// Note: In the past, it used .map and Promise.all; this can be changed in the future
178
178
// 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 } )
180
180
return res
181
181
}
182
182
Original file line number Diff line number Diff line change @@ -154,8 +154,8 @@ class LogicEngine {
154
154
// END OPTIMIZER BLOCK //
155
155
156
156
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 } )
159
159
return res
160
160
}
161
161
Original file line number Diff line number Diff line change 3
3
* Coerces a value into an array.
4
4
* This is used for unary value operations.
5
5
*/
6
- export function coerceArray ( value , skip = false ) {
7
- if ( skip ) return value
6
+ export function coerceArray ( value ) {
8
7
return Array . isArray ( value ) ? value : [ value ]
9
8
}
You can’t perform that action at this time.
0 commit comments