From 7cb477a3a055c9ba35fa9a7e0f6366fe4f614b3c Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 2 Feb 2018 15:47:39 -0800 Subject: [PATCH] Use `new` to create the array clone. --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 9e7ccf7bb..86b22c9b1 100644 --- a/lodash.js +++ b/lodash.js @@ -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')) {