From 4b97d0e84f38abe369b745092bc2e5860a5eb9f7 2014-01-16 10:57:00 From: Jonathan Frederic Date: 2014-01-16 10:57:00 Subject: [PATCH] Fixed bug that prevent model.save() from being called on widget models without views. --- diff --git a/IPython/html/static/notebook/js/widget.js b/IPython/html/static/notebook/js/widget.js index 12bfd55..4a2ab18 100644 --- a/IPython/html/static/notebook/js/widget.js +++ b/IPython/html/static/notebook/js/widget.js @@ -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++;