fix(util-registry): handle negative indices correctly
This commit is contained in:
parent
a5e666d155
commit
cbc03f57c5
@ -106,7 +106,7 @@ export class UtilRegistry {
|
||||
}
|
||||
let utilIndex = this._activeUtilInstancesWrapped.indexOf(util);
|
||||
util.destroy();
|
||||
this._activeUtilInstancesWrapped.splice(utilIndex, 1);
|
||||
if (utilIndex >= 0) this._activeUtilInstancesWrapped.splice(utilIndex, 1);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user