diff --git a/countBy.js b/countBy.js index fb5d44752..f72ece75b 100644 --- a/countBy.js +++ b/countBy.js @@ -22,6 +22,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty */ function countBy(collection, iteratee) { return reduce(collection, (result, value, key) => { + key = iteratee(value) if (hasOwnProperty.call(result, key)) { ++result[key] } else {