mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 08:37:49 +00:00
Use the new operator with the Array constructor.
This commit is contained in:
@@ -10,7 +10,7 @@ function copyArray(source, array) {
|
||||
let index = -1
|
||||
const length = source.length
|
||||
|
||||
array || (array = Array(length))
|
||||
array || (array = new Array(length))
|
||||
while (++index < length) {
|
||||
array[index] = source[index]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user