diff --git a/invert.js b/invert.js index f978f253b..e37150101 100644 --- a/invert.js +++ b/invert.js @@ -1,4 +1,4 @@ -import baseForOwn from './baseForOwn.js' +import baseForOwn from './.internal/baseForOwn.js' /** * Creates an object composed of the inverted keys and values of `object`. diff --git a/invertBy.js b/invertBy.js index 6a948ce48..cdafa7d2f 100644 --- a/invertBy.js +++ b/invertBy.js @@ -1,4 +1,4 @@ -import baseForOwn from './baseForOwn.js' +import baseForOwn from './.internal/baseForOwn.js' /** Used to check objects for own properties. */ const hasOwnProperty = Object.prototype.hasOwnProperty @@ -25,6 +25,7 @@ const hasOwnProperty = Object.prototype.hasOwnProperty function invertBy(object, iteratee) { const result = {} baseForOwn(object, (value, key) => { + value = iteratee(value) if (hasOwnProperty.call(result, value)) { result[value].push(key)