Merge pull request #1723 from Gerharddc/patch-1

Stop Permissions being redefined and breaking Jest
This commit is contained in:
Kenneth Geisshirt 2018-04-03 11:42:26 +02:00 committed by GitHub
commit 6b3b34ae54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 4 deletions

View File

@ -257,11 +257,13 @@ module.exports = function(realmConstructor) {
permissions: '__Permission[]'
}
});
if (!realmConstructor.Permissions) {
Object.defineProperty(realmConstructor, 'Permissions', {
value: permissionsSchema,
configurable: false
});
}
}
// TODO: Remove this now useless object.
var types = Object.freeze({