mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
Delete unnecessary check for comm object
This commit is contained in:
parent
41170f7471
commit
45206783c2
@ -56,10 +56,8 @@ function(widget_manager, underscore, backbone){
|
||||
_handle_comm_closed: function (msg) {
|
||||
// jng: widget manager should observe the comm_close event and delete views when triggered
|
||||
this.trigger('comm:close');
|
||||
if (this._has_comm()) {
|
||||
delete this.comm.model; // Delete ref so GC will collect widget model.
|
||||
delete this.comm;
|
||||
}
|
||||
delete this.comm.model; // Delete ref so GC will collect widget model.
|
||||
delete this.comm;
|
||||
delete this.widget_id; // Delete id from model so widget manager cleans up.
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user