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:
Yavor Georgiev 2016-09-09 01:33:42 +03:00 committed by GitHub
parent 876417716f
commit 33eb3fe06f
2 changed files with 4 additions and 3 deletions

View File

@ -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) {

View File

@ -68,7 +68,8 @@ Object.defineProperty(realmConstructor, 'Types', {
/* eslint-enable no-console */
}
return types;
}
},
configurable: true
});
module.exports = realmConstructor;