mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-09 02:17:50 +00:00
Fix feature test for IE tech preview.
This commit is contained in:
@@ -775,6 +775,7 @@
|
|||||||
getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
|
getOwnPropertySymbols = isNative(getOwnPropertySymbols = Object.getOwnPropertySymbols) && getOwnPropertySymbols,
|
||||||
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
getPrototypeOf = isNative(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf,
|
||||||
push = arrayProto.push,
|
push = arrayProto.push,
|
||||||
|
preventExtensions = isNative(Object.preventExtensions = Object.preventExtensions) && preventExtensions,
|
||||||
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
propertyIsEnumerable = objectProto.propertyIsEnumerable,
|
||||||
Set = isNative(Set = context.Set) && Set,
|
Set = isNative(Set = context.Set) && Set,
|
||||||
setTimeout = context.setTimeout,
|
setTimeout = context.setTimeout,
|
||||||
@@ -796,13 +797,13 @@
|
|||||||
|
|
||||||
/** Used as `baseAssign`. */
|
/** Used as `baseAssign`. */
|
||||||
var nativeAssign = (function() {
|
var nativeAssign = (function() {
|
||||||
var object = Object('x'),
|
var object = { '1': 0 },
|
||||||
func = isNative(func = Object.assign) && func;
|
func = preventExtensions && isNative(func = Object.assign) && func;
|
||||||
|
|
||||||
// Avoid `Object.assign` in Firefox 34-37 which have an early implementation
|
// Avoid `Object.assign` in Firefox 34-37 which have an early implementation
|
||||||
// with a slower try/catch behavior. See https://bugzilla.mozilla.org/show_bug.cgi?id=1103344
|
// with a slower try/catch behavior. See https://bugzilla.mozilla.org/show_bug.cgi?id=1103344
|
||||||
// for more details.
|
// for more details.
|
||||||
try { func(object, 'xo'); } catch(e) {}
|
try { func(preventExtensions(object), 'xo'); } catch(e) {}
|
||||||
return !object[1] && func;
|
return !object[1] && func;
|
||||||
}());
|
}());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user