mirror of https://gitee.com/bigwinds/arangodb
Unbreak shallowCopy
This commit is contained in:
parent
9d6e22f2a3
commit
4af0c67c5c
|
@ -37,17 +37,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Object.defineProperty(Object.prototype, '_shallowCopy', {
|
||||
set(value) {
|
||||
if (this === Object.prototype) {
|
||||
throw new TypeError(`Can not override Object.prototype._shallowCopy!`);
|
||||
}
|
||||
Object.defineProperty(this, '_shallowCopy', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value
|
||||
});
|
||||
},
|
||||
get() {
|
||||
var self = this;
|
||||
return Object.prototype.propertyKeys.reduce(function (previous, key) {
|
||||
|
@ -66,18 +55,7 @@ Object.defineProperty(Object.prototype, 'propertyKeys', {
|
|||
return Object.keys(this).filter(function (key) {
|
||||
return (key.charAt(0) !== '_' && key.charAt(0) !== '$');
|
||||
});
|
||||
},
|
||||
set(value) {
|
||||
if (this === Object.prototype) {
|
||||
throw new TypeError(`Can not override Object.prototype.propertyKeys!`);
|
||||
}
|
||||
Object.defineProperty(this, 'propertyKeys', {
|
||||
configurable: true,
|
||||
enumerable: true,
|
||||
writable: true,
|
||||
value
|
||||
});
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue