Store destroyStore throw Cannot call method 'clear' of null
I've got Cannot call method 'clear' of null, when my store configured as
Code:
{
autoDestroy: true,
buffered: true
}
Notice that Ext.data.Store has method
Code:
destroyStore: function() {
this.callParent(arguments);
if (this.buffered) {
this.data.clear(); // this.data is null
}
},
And parent class Ext.data.AbstractStore set me.data to null
Code:
destroyStore: function() {
var me = this;
if (!me.isDestroyed) {
if (me.storeId) {
Ext.data.StoreManager.unregister(me);
}
me.clearData();
me.data = me.tree = me.sorters = me.filters = me.groupers = null;
if (me.reader) {
me.reader.destroyReader();
}
me.proxy = me.reader = me.writer = null;
me.clearListeners();
me.isDestroyed = true;
if (me.implicitModel) {
Ext.destroy(me.model);
} else {
me.model = null;
}
}
},