mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Use the new operator with the Array constructor.
This commit is contained in:
@@ -16,7 +16,7 @@ const nativeMax = Math.max
|
||||
function baseRange(start, end, step, fromRight) {
|
||||
let index = -1
|
||||
let length = nativeMax(nativeCeil((end - start) / (step || 1)), 0)
|
||||
const result = Array(length)
|
||||
const result = new Array(length)
|
||||
|
||||
while (length--) {
|
||||
result[fromRight ? length : ++index] = start
|
||||
|
||||
Reference in New Issue
Block a user