mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Use new to create the array clone.
This commit is contained in:
@@ -6160,7 +6160,7 @@
|
||||
*/
|
||||
function initCloneArray(array) {
|
||||
var length = array.length,
|
||||
result = array.constructor(length);
|
||||
result = new array.constructor(length);
|
||||
|
||||
// Add properties assigned by `RegExp#exec`.
|
||||
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
|
||||
|
||||
Reference in New Issue
Block a user