mirror of
https://github.com/nasa/openmct.git
synced 2025-06-23 01:18:57 +00:00
Fix bug with removeCondition
This commit is contained in:
@ -123,11 +123,8 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
this.persistConditions();
|
this.persistConditions();
|
||||||
}
|
}
|
||||||
|
|
||||||
removeCondition(condition, index) {
|
removeCondition(conditionConfiguration, index) {
|
||||||
// const found = this.findConditionById(id);
|
let condition = this.conditionClassCollection[index];
|
||||||
// if (found) {
|
|
||||||
// const index = found.index;
|
|
||||||
// let condition = this.conditionClassCollection[index];
|
|
||||||
condition.destroyCriteria();
|
condition.destroyCriteria();
|
||||||
condition.off('conditionResultUpdated', this.handleConditionResult.bind(this));
|
condition.off('conditionResultUpdated', this.handleConditionResult.bind(this));
|
||||||
this.conditionClassCollection.splice(index, 1);
|
this.conditionClassCollection.splice(index, 1);
|
||||||
@ -137,7 +134,6 @@ export default class ConditionManager extends EventEmitter {
|
|||||||
}
|
}
|
||||||
this.persistConditions();
|
this.persistConditions();
|
||||||
this.handleConditionResult();
|
this.handleConditionResult();
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
findConditionById(id) {
|
findConditionById(id) {
|
||||||
|
Reference in New Issue
Block a user