mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Missing iteratee call in countBy (missed in 5baad4d).
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user