Remove double declared length var in sample.

This commit is contained in:
John-David Dalton
2015-08-18 14:03:04 -07:00
parent 2c1c8fc8df
commit 356e47a6a3

View File

@@ -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,