mirror of
https://github.com/nasa/openmct.git
synced 2025-04-10 12:50:15 +00:00
pass correct args into off listener
This commit is contained in:
parent
469e93d916
commit
483ee173d6
@ -185,11 +185,10 @@ export default class ConditionClass extends EventEmitter {
|
||||
let found = this.findCriterion(id);
|
||||
if (found) {
|
||||
let criterion = found.item;
|
||||
criterion.destroy();
|
||||
// TODO this is passing the wrong args
|
||||
criterion.off('criterionUpdated', (result) => {
|
||||
this.handleCriterionUpdated(id, result);
|
||||
criterion.off('criterionUpdated', (obj) => {
|
||||
this.handleCriterionUpdated(obj);
|
||||
});
|
||||
criterion.destroy();
|
||||
this.criteria.splice(found.index, 1);
|
||||
if (this.criteriaResults[criterion.id] !== undefined) {
|
||||
delete this.criteriaResults[criterion.id];
|
||||
|
Loading…
x
Reference in New Issue
Block a user