mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Fixin loop args order regression from 3c2795b in invert.
This commit is contained in:
@@ -18,7 +18,8 @@ const toString = Object.prototype.toString
|
|||||||
*/
|
*/
|
||||||
function invert(object) {
|
function invert(object) {
|
||||||
const result = {}
|
const result = {}
|
||||||
Object.keys(object).forEach((value, key) => {
|
Object.keys(object).forEach((key) => {
|
||||||
|
let value = object[key]
|
||||||
if (value != null && typeof value.toString != 'function') {
|
if (value != null && typeof value.toString != 'function') {
|
||||||
value = toString.call(value)
|
value = toString.call(value)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user