From 356e47a6a384556a6c248593492d211b0bdc992e Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 18 Aug 2015 14:03:04 -0700 Subject: [PATCH] Remove double declared `length` var in `sample`. --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index 41727db4c..265c0b5a0 100644 --- a/lodash.js +++ b/lodash.js @@ -6375,7 +6375,7 @@ function sample(collection, n, guard) { if (guard || n == null) { collection = isArrayLike(collection) ? collection : values(collection); - var length = collection.length; + length = collection.length; return length > 0 ? collection[baseRandom(0, length - 1)] : undefined; } var index = -1,