mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 23:04:29 +00:00
Stop Permissions being redefined and breaking Jest
Fixes a related problem in exactly the same way as https://github.com/realm/realm-js/pull/1695 .
This commit is contained in:
parent
c370ef4d86
commit
7152afddd9
@ -257,10 +257,12 @@ module.exports = function(realmConstructor) {
|
||||
permissions: '__Permission[]'
|
||||
}
|
||||
});
|
||||
Object.defineProperty(realmConstructor, 'Permissions', {
|
||||
value: permissionsSchema,
|
||||
configurable: false
|
||||
});
|
||||
if (!realmConstructor.Permissions) {
|
||||
Object.defineProperty(realmConstructor, 'Permissions', {
|
||||
value: permissionsSchema,
|
||||
configurable: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Remove this now useless object.
|
||||
|
Loading…
x
Reference in New Issue
Block a user