Missing iteratee call in countBy (missed in 5baad4d).

This commit is contained in:
Michał Lipiński
2017-02-22 22:28:42 +01:00
parent 56b7d339a6
commit 1e8ac50ab5

View File

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