mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Fix failing map/set tests in IE11.
This commit is contained in:
14
lodash.js
14
lodash.js
@@ -300,7 +300,8 @@
|
|||||||
* @returns {Object} Returns `map`.
|
* @returns {Object} Returns `map`.
|
||||||
*/
|
*/
|
||||||
function addMapEntry(map, pair) {
|
function addMapEntry(map, pair) {
|
||||||
return map.set(pair[0], pair[1]);
|
map.set(pair[0], pair[1]);
|
||||||
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -312,7 +313,8 @@
|
|||||||
* @returns {Object} Returns `set`.
|
* @returns {Object} Returns `set`.
|
||||||
*/
|
*/
|
||||||
function addSetEntry(set, value) {
|
function addSetEntry(set, value) {
|
||||||
return set.add(value);
|
set.add(value);
|
||||||
|
return set;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1874,7 +1876,7 @@
|
|||||||
var tag = objToString.call(value),
|
var tag = objToString.call(value),
|
||||||
isFunc = tag == funcTag;
|
isFunc = tag == funcTag;
|
||||||
|
|
||||||
if (tag == objectTag && noMapSetTag) {
|
if (noMapSetTag && tag == objectTag) {
|
||||||
tag = isMap(value) ? mapTag : (isSet(value) ? setTag : tag);
|
tag = isMap(value) ? mapTag : (isSet(value) ? setTag : tag);
|
||||||
}
|
}
|
||||||
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
|
||||||
@@ -2284,7 +2286,7 @@
|
|||||||
|
|
||||||
if (!objIsArr) {
|
if (!objIsArr) {
|
||||||
objTag = objToString.call(object);
|
objTag = objToString.call(object);
|
||||||
if (othTag == objectTag && noMapSetTag) {
|
if (noMapSetTag && objTag == objectTag) {
|
||||||
objTag = isMap(object) ? mapTag : (isSet(object) ? setTag : objTag);
|
objTag = isMap(object) ? mapTag : (isSet(object) ? setTag : objTag);
|
||||||
} else if (objTag == argsTag) {
|
} else if (objTag == argsTag) {
|
||||||
objTag = objectTag;
|
objTag = objectTag;
|
||||||
@@ -2294,7 +2296,7 @@
|
|||||||
}
|
}
|
||||||
if (!othIsArr) {
|
if (!othIsArr) {
|
||||||
othTag = objToString.call(other);
|
othTag = objToString.call(other);
|
||||||
if (othTag == objectTag && noMapSetTag) {
|
if (noMapSetTag && othTag == objectTag) {
|
||||||
othTag = isMap(other) ? mapTag : (isSet(other) ? setTag : othTag);
|
othTag = isMap(other) ? mapTag : (isSet(other) ? setTag : othTag);
|
||||||
} else if (othTag == argsTag) {
|
} else if (othTag == argsTag) {
|
||||||
othTag = objectTag;
|
othTag = objectTag;
|
||||||
@@ -8810,7 +8812,7 @@
|
|||||||
return iteratorToArray(value[iteratorSymbol]());
|
return iteratorToArray(value[iteratorSymbol]());
|
||||||
}
|
}
|
||||||
var tag = objToString.call(value);
|
var tag = objToString.call(value);
|
||||||
if (tag == objectTag && noMapSetTag) {
|
if (noMapSetTag && tag == objectTag) {
|
||||||
tag = isMap(value) ? mapTag : (isSet(value) ? setTag : tag);
|
tag = isMap(value) ? mapTag : (isSet(value) ? setTag : tag);
|
||||||
}
|
}
|
||||||
var func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
var func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
|
||||||
|
|||||||
Reference in New Issue
Block a user