From 536f09b68c4aa2571b34b09100fd20540d81072c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lipi=C5=84ski?= Date: Fri, 14 Jul 2017 13:10:04 +0200 Subject: [PATCH] Fixin loop args order regression from 3c2795b in `invert`. --- invert.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invert.js b/invert.js index 1078a2534..570955838 100644 --- a/invert.js +++ b/invert.js @@ -18,7 +18,8 @@ const toString = Object.prototype.toString */ function invert(object) { const result = {} - Object.keys(object).forEach((value, key) => { + Object.keys(object).forEach((key) => { + let value = object[key] if (value != null && typeof value.toString != 'function') { value = toString.call(value) }