Cleanup Babel workaround.

This commit is contained in:
John-David Dalton
2016-10-05 16:12:31 -07:00
parent 1665e5cbff
commit bdf0b9f288

View File

@@ -890,13 +890,10 @@
assert.deepEqual(actual, [object, object], label); assert.deepEqual(actual, [object, object], label);
try { try {
var symObject = Object(symbol); // Avoid buggy symbol detection in Babel's `_typeof` helper.
var symObject = setProperty(Object(symbol), 'constructor', Object);
// Avoid symbol detection in Babel's `typeof` helper.
symObject.constructor = Object;
actual = [ actual = [
Symbol ? lodashBizarro.clone(symObject) : { 'constructor': Object }, Symbol ? lodashBizarro.clone(symObject) : {},
Symbol ? lodashBizarro.isEqual(symObject, Object(symbol)) : false, Symbol ? lodashBizarro.isEqual(symObject, Object(symbol)) : false,
Symbol ? lodashBizarro.toString(symObject) : '' Symbol ? lodashBizarro.toString(symObject) : ''
]; ];
@@ -904,7 +901,7 @@
actual = null; actual = null;
} }
label = message('_.clone`, `_.isEqual`, and `_.toString', 'Symbol'); label = message('_.clone`, `_.isEqual`, and `_.toString', 'Symbol');
assert.deepEqual(actual, [{ 'constructor': Object }, false, ''], label); assert.deepEqual(actual, [{}, false, ''], label);
try { try {
var map = new lodashBizarro.memoize.Cache; var map = new lodashBizarro.memoize.Cache;