mirror of
https://github.com/status-im/realm-js.git
synced 2025-02-22 19:28:33 +00:00
Fix "const" search and replace
This commit is contained in:
parent
dd5304356b
commit
cb4fea97d4
@ -5,14 +5,14 @@ let rpc = require('./rpc');
|
|||||||
let idKey = Symbol();
|
let idKey = Symbol();
|
||||||
let realmKey = Symbol();
|
let realmKey = Symbol();
|
||||||
let schemaKey = Symbol();
|
let schemaKey = Symbol();
|
||||||
let registeredconstructors = {};
|
let registeredConstructors = {};
|
||||||
|
|
||||||
exports.create = create;
|
exports.create = create;
|
||||||
exports.registerconstructors = registerconstructors;
|
exports.registerConstructors = registerConstructors;
|
||||||
|
|
||||||
function create(realmId, info) {
|
function create(realmId, info) {
|
||||||
let schema = info.schema;
|
let schema = info.schema;
|
||||||
let constructor = (registeredconstructors[realmId] || {})[schema.name];
|
let constructor = (registeredConstructors[realmId] || {})[schema.name];
|
||||||
let object = constructor ? Object.create(constructor.prototype) : {};
|
let object = constructor ? Object.create(constructor.prototype) : {};
|
||||||
let props = {};
|
let props = {};
|
||||||
|
|
||||||
@ -34,8 +34,8 @@ function create(realmId, info) {
|
|||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
||||||
function registerconstructors(realmId, constructors) {
|
function registerConstructors(realmId, constructors) {
|
||||||
registeredconstructors[realmId] = constructors;
|
registeredConstructors[realmId] = constructors;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getterForProperty(name) {
|
function getterForProperty(name) {
|
||||||
|
@ -29,7 +29,7 @@ class Realm {
|
|||||||
|
|
||||||
let realmId = this[realmKey] = rpc.createRealm(config);
|
let realmId = this[realmKey] = rpc.createRealm(config);
|
||||||
|
|
||||||
objects.registerconstructors(realmId, constructors);
|
objects.registerConstructors(realmId, constructors);
|
||||||
}
|
}
|
||||||
|
|
||||||
addNotification(callback) {
|
addNotification(callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user