From e3566eb1ce7afe7387c0f7334b307d85a5daff21 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 20 Apr 2016 01:24:00 -0700 Subject: [PATCH] Use `Set` only if it coerces `-0` correctly. --- lodash.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lodash.js b/lodash.js index f2115afa0..f4834d0b3 100644 --- a/lodash.js +++ b/lodash.js @@ -4880,7 +4880,7 @@ * @param {Array} values The values to add to the set. * @returns {Object} Returns the new set. */ - var createSet = !(Set && new Set([1, 2]).size === 2) ? noop : function(values) { + var createSet = !(Set && (1 / setToArray(new Set([-0]))[0]) == INFINITY) ? noop : function(values) { return new Set(values); };