mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Fixin loop args order regression from 3c2795b in invertBy.
This commit is contained in:
@@ -22,8 +22,8 @@ const hasOwnProperty = Object.prototype.hasOwnProperty
|
||||
*/
|
||||
function invertBy(object, iteratee) {
|
||||
const result = {}
|
||||
Object.keys(object).forEach((value, key) => {
|
||||
value = iteratee(value)
|
||||
Object.keys(object).forEach((key) => {
|
||||
const value = iteratee(object[key])
|
||||
if (hasOwnProperty.call(result, value)) {
|
||||
result[value].push(key)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user