mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
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');
|
let userMethods = require('./user-methods');
|
||||||
Object.defineProperties(realmConstructor.Sync.User, getOwnPropertyDescriptors(userMethods.static));
|
Object.defineProperties(realmConstructor.Sync.User, getOwnPropertyDescriptors(userMethods.static));
|
||||||
Object.defineProperties(realmConstructor.Sync.User.prototype, getOwnPropertyDescriptors(userMethods.instance));
|
Object.defineProperties(realmConstructor.Sync.User.prototype, getOwnPropertyDescriptors(userMethods.instance));
|
||||||
|
Object.defineProperty(realmConstructor.Sync.User, '_realmConstructor', { value: realmConstructor });
|
||||||
|
|
||||||
realmConstructor.Sync.AuthError = require('./errors').AuthError;
|
realmConstructor.Sync.AuthError = require('./errors').AuthError;
|
||||||
|
|
||||||
|
@ -179,8 +179,7 @@ module.exports = {
|
|||||||
|
|
||||||
url.set('pathname', '/~/__management');
|
url.set('pathname', '/~/__management');
|
||||||
|
|
||||||
const realmConstructor = require('./index');
|
return new this.constructor._realmConstructor({
|
||||||
return new realmConstructor({
|
|
||||||
schema: require('./management-schema'),
|
schema: require('./management-schema'),
|
||||||
sync: {
|
sync: {
|
||||||
user: this,
|
user: this,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user