From 135cb0ad881eb91c9b7d7146768d173fc734ad24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipi=C5=84ski?= Date: Mon, 13 Feb 2017 17:05:18 +0100 Subject: [PATCH] Fixin imports in invert methods. (#3002) --- invert.js | 2 +- invertBy.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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)