diff --git a/lib/extensions.js b/lib/extensions.js index b28ed09c..505bdf51 100644 --- a/lib/extensions.js +++ b/lib/extensions.js @@ -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.