mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-30 23:17:48 +00:00
Missing iteratee call in groupBy and keyBy.
This commit is contained in:
@@ -23,6 +23,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
*/
|
||||
function groupBy(collection, iteratee) {
|
||||
return reduce(collection, (result, value, key) => {
|
||||
key = iteratee(value)
|
||||
if (hasOwnProperty.call(result, key)) {
|
||||
result[key].push(value)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user