mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +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.
|
||||
* @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);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user