mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +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) {
|
function invertBy(object, iteratee) {
|
||||||
const result = {}
|
const result = {}
|
||||||
Object.keys(object).forEach((value, key) => {
|
Object.keys(object).forEach((key) => {
|
||||||
value = iteratee(value)
|
const value = iteratee(object[key])
|
||||||
if (hasOwnProperty.call(result, value)) {
|
if (hasOwnProperty.call(result, value)) {
|
||||||
result[value].push(key)
|
result[value].push(key)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user