Merge 02541b25bb
into b96605c63a
This commit is contained in:
commit
a50e579931
|
@ -138,12 +138,14 @@ app.model = function(Model, config) {
|
|||
this.models().push(Model);
|
||||
|
||||
if (isPublic && Model.sharedClass) {
|
||||
this.remotes().defineObjectType(Model.modelName, function(data) {
|
||||
var remotes = this.remotes();
|
||||
|
||||
remotes.defineObjectType(Model.modelName, function(data) {
|
||||
return new Model(data);
|
||||
});
|
||||
this.remotes().addClass(Model.sharedClass);
|
||||
remotes.addClass(Model.sharedClass);
|
||||
if (Model.settings.trackChanges && Model.Change) {
|
||||
this.remotes().addClass(Model.Change.sharedClass);
|
||||
remotes.addClass(Model.Change.sharedClass);
|
||||
}
|
||||
clearHandlerCache(this);
|
||||
this.emit('modelRemoted', Model.sharedClass);
|
||||
|
|
Loading…
Reference in New Issue