Fix loading the constructor for node-server-sdk
This commit is contained in:
parent
7c1dab7079
commit
716201a1fe
|
@ -45,6 +45,7 @@ module.exports = function(realmConstructor) {
|
|||
let userMethods = require('./user-methods');
|
||||
Object.defineProperties(realmConstructor.Sync.User, getOwnPropertyDescriptors(userMethods.static));
|
||||
Object.defineProperties(realmConstructor.Sync.User.prototype, getOwnPropertyDescriptors(userMethods.instance));
|
||||
Object.defineProperty(realmConstructor.Sync.User, '_realmConstructor', { value: realmConstructor });
|
||||
|
||||
realmConstructor.Sync.AuthError = require('./errors').AuthError;
|
||||
|
||||
|
|
|
@ -179,8 +179,7 @@ module.exports = {
|
|||
|
||||
url.set('pathname', '/~/__management');
|
||||
|
||||
const realmConstructor = require('./index');
|
||||
return new realmConstructor({
|
||||
return new this.constructor._realmConstructor({
|
||||
schema: require('./management-schema'),
|
||||
sync: {
|
||||
user: this,
|
||||
|
|
Loading…
Reference in New Issue