From 56cd679bcdd428575587b2ee4fec2c25096ebfa2 Mon Sep 17 00:00:00 2001 From: jdalton Date: Wed, 17 Jun 2015 22:35:53 -0700 Subject: [PATCH] Improve perf of `max` and `min` common case with arrays. --- lodash.src.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.src.js b/lodash.src.js index 20fc01e77..3d7add277 100644 --- a/lodash.src.js +++ b/lodash.src.js @@ -3316,7 +3316,7 @@ } iteratee = getCallback(iteratee, thisArg, 3); if (iteratee.length == 1) { - collection = toIterable(collection); + collection = isArray(collection) ? collection : toIterable(collection); var result = arrayExtremum(collection, iteratee, comparator, exValue); if (!(collection.length && result === exValue)) { return result;