Browse Source

Pull request #269825: KERNEL-17875 fix: fineui Dep不能回收问题

Merge in DEC/fineui from ~DAILER/fineui-decision:feature/x to feature/x

* commit 'c87867cf2ea6b0ff935d2620f5ecc2c86108125c':
  KERNEL-17875 fix: fineui Dep不能回收问题
master
Dailer-刘荣歆 8 months ago
parent
commit
f4a5e2e574
  1. 1
      packages/fineui/src/fix/fix.compact.js
  2. 10
      packages/fineui/src/fix/fix.js

1
packages/fineui/src/fix/fix.compact.js

@ -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);

10
packages/fineui/src/fix/fix.js

@ -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;
return;
}
const index = arr.indexOf(item);
if (index > -1) {
return arr.splice(index, 1);

Loading…
Cancel
Save