mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 03:17:49 +00:00
Update propertyIsEnumerable mock for support.nonEnumArgs feature test changes.
This commit is contained in:
@@ -97,10 +97,10 @@
|
|||||||
|
|
||||||
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
|
setProperty(objectProto, '_propertyIsEnumerable', propertyIsEnumerable);
|
||||||
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
|
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
|
||||||
if (key == '1' && this && typeof this == 'object' && this.length === 2 &&
|
if (key == '1' && this && typeof this == 'object' &&
|
||||||
hasOwnProperty.call(this, 'callee') &&
|
hasOwnProperty.call(this, 'callee') &&
|
||||||
!propertyIsEnumerable.call(this, 'callee') &&
|
!propertyIsEnumerable.call(this, 'callee') &&
|
||||||
this[0] === 0 && this[1] === 0) {
|
this.length === 2 && this[0] === 1 && this[1] === 0) {
|
||||||
throw new Error;
|
throw new Error;
|
||||||
}
|
}
|
||||||
return propertyIsEnumerable.call(this, key);
|
return propertyIsEnumerable.call(this, key);
|
||||||
|
|||||||
@@ -468,10 +468,10 @@
|
|||||||
|
|
||||||
var _propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
var _propertyIsEnumerable = objectProto.propertyIsEnumerable;
|
||||||
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
|
setProperty(objectProto, 'propertyIsEnumerable', function(key) {
|
||||||
if (key == '1' && _.isArguments(this) && _.isEqual(_.values(this), [0, 0])) {
|
if (key == '1' && _.isArguments(this) && _.isEqual(_.values(this), [1, 0])) {
|
||||||
throw new Error;
|
throw new Error;
|
||||||
}
|
}
|
||||||
return _.has(this, key);
|
return _propertyIsEnumerable.call(this, key);
|
||||||
});
|
});
|
||||||
|
|
||||||
var _isFinite = Number.isFinite;
|
var _isFinite = Number.isFinite;
|
||||||
|
|||||||
Reference in New Issue
Block a user