mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Use the new operator with the Array constructor.
This commit is contained in:
@@ -21,7 +21,7 @@ function baseSlice(array, start, end) {
|
||||
length = start > end ? 0 : ((end - start) >>> 0)
|
||||
start >>>= 0
|
||||
|
||||
const result = Array(length)
|
||||
const result = new Array(length)
|
||||
while (++index < length) {
|
||||
result[index] = array[index + start]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user