mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-10 14:25:58 +00:00
Make Collection prototype methods configurable and writable (#592)
* Make Collection prototype methods configurable and writable * Make `Realm.Types` re-definable
This commit is contained in:
parent
876417716f
commit
33eb3fe06f
@ -47,7 +47,7 @@ if (iteratorSymbol) {
|
||||
].forEach(function(methodName) {
|
||||
var method = arrayPrototype[methodName];
|
||||
if (method) {
|
||||
exports[methodName] = {value: method};
|
||||
exports[methodName] = {value: method, configurable: true, writable: true};
|
||||
}
|
||||
});
|
||||
|
||||
@ -83,7 +83,7 @@ if (iteratorSymbol) {
|
||||
});
|
||||
};
|
||||
|
||||
exports[methodName] = {value: method};
|
||||
exports[methodName] = {value: method, configurable: true, writable: true};
|
||||
});
|
||||
|
||||
if (iteratorSymbol) {
|
||||
|
@ -68,7 +68,8 @@ Object.defineProperty(realmConstructor, 'Types', {
|
||||
/* eslint-enable no-console */
|
||||
}
|
||||
return types;
|
||||
}
|
||||
},
|
||||
configurable: true
|
||||
});
|
||||
|
||||
module.exports = realmConstructor;
|
||||
|
Loading…
x
Reference in New Issue
Block a user