Fixed bug that prevent model.save() from being called on

widget models without views.
This commit is contained in:
Jonathan Frederic 2013-11-13 23:30:31 +00:00
parent f286e1bb4d
commit d35d8c242e

View File

@ -124,7 +124,12 @@ define(["components/underscore/underscore-min",
}
var data = {sync_method: method, sync_data: send_json};
var output_area = this.last_modified_view.output_area;
var output_area = null;
if (this.last_modified_view != undefined && this.last_modified_view != null) {
output_area = this.last_modified_view.output_area;
}
var callbacks = this._make_callbacks(output_area);
this.comm.send(data, callbacks);
this.pending_msgs++;