mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-12 20:07:49 +00:00
Use Set only if it coerces -0 correctly.
This commit is contained in:
@@ -4880,7 +4880,7 @@
|
|||||||
* @param {Array} values The values to add to the set.
|
* @param {Array} values The values to add to the set.
|
||||||
* @returns {Object} Returns the new 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);
|
return new Set(values);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user