Fix failing map/set tests in IE11.

This commit is contained in:
John-David Dalton
2015-09-03 12:58:06 -07:00
parent 617dd703e1
commit 3e42a817a1

View File

@@ -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);