diff --git a/api/webapp/extPatches/ext4-patches.js b/api/webapp/extPatches/ext4-patches.js index a81239777c8..65d74603c89 100644 --- a/api/webapp/extPatches/ext4-patches.js +++ b/api/webapp/extPatches/ext4-patches.js @@ -446,6 +446,24 @@ Ext4.override(Ext4.data.Store, { } }); +/** + * Delayed query/type-ahead tasks and remote load callbacks can fire after onDestroy has nulled the store. Avoid throwing by checking if destroyed. + */ +Ext4.override(Ext4.form.field.ComboBox, { + doRawQuery: function() { + if (!this.isDestroyed) + this.callParent(arguments); + }, + onTypeAhead: function() { + if (!this.isDestroyed) + this.callParent(arguments); + }, + afterQuery: function() { + if (!this.isDestroyed) + this.callParent(arguments); + } +}); + /** * RowExpander plugin is not properly configured to handle sandboxed ExtJS. */