@ -204,6 +204,7 @@ Widget.prototype.__destroy = function() {
unwatch();
});
Fix.cleanupDeps();
this._watchers && (this._watchers = []);
if (this.store) {
this.store._parent && (this.store._parent = null);
@ -110,7 +110,15 @@ function isExtensible(obj) {
function remove(arr, item) {
if (arr && arr.length) {
if (!arr) {
return;
}
const len = arr.length;
if (len) {
if (item === arr[len - 1]) {
arr.length = len - 1;
const index = arr.indexOf(item);
if (index > -1) {
return arr.splice(index, 1);