Skip to content

Commit

Permalink
check if panel is destroyed while loading
Browse files Browse the repository at this point in the history
  • Loading branch information
mschering committed Oct 12, 2020
1 parent 061bbcd commit e967147
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion www/go/core/views/extjs3/detail/Panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ go.detail.Panel = Ext.extend(Ext.Panel, {
},

internalLoad : function(data) {

//in case user destroys panel while loading
if(this.isDestroyed) {
return Promise.resolve(data);
}

this.watchRelations = {};
if(this.getTopToolbar()) {
this.getTopToolbar().setDisabled(false);
Expand Down Expand Up @@ -214,7 +220,7 @@ go.detail.Panel = Ext.extend(Ext.Panel, {
}
}).catch(function(e) {
console.error(e);
Ext.MessageBox.alert(t("Not found"), "The requested page was not found");
Ext.MessageBox.alert(t("Error"), e.error);
}).finally(function() {
me.loading = false;
});
Expand Down

0 comments on commit e967147

Please sign in to comment.