fix(util-registry): filtering activeUtilInstances when a util is destroyed
This commit is contained in:
parent
5078b56c16
commit
5b4ac75874
@ -104,9 +104,10 @@ export class UtilRegistry {
|
||||
if(DEBUG_MODE > 2) {
|
||||
console.log('Destroying Util: ', {util});
|
||||
}
|
||||
let utilIndex = this._activeUtilInstancesWrapped.indexOf(util);
|
||||
util.destroy();
|
||||
if (utilIndex >= 0) this._activeUtilInstancesWrapped.splice(utilIndex, 1);
|
||||
this._activeUtilInstancesWrapped = this._activeUtilInstancesWrapped.filter(utilWrapped => {
|
||||
return utilWrapped.element === util._element;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user