mirror of
https://github.com/nasa/openmct.git
synced 2025-05-28 21:24:20 +00:00
Merge pull request #2786 from nasa/issue-2773
[Conditions] cleanup subscriptions in style rule manager
This commit is contained in:
commit
de8f8088e2
@ -48,6 +48,8 @@ export default class StyleRuleManager extends EventEmitter {
|
|||||||
this.stopProvidingTelemetry();
|
this.stopProvidingTelemetry();
|
||||||
}
|
}
|
||||||
this.openmct.objects.get(this.conditionSetIdentifier).then((conditionSetDomainObject) => {
|
this.openmct.objects.get(this.conditionSetIdentifier).then((conditionSetDomainObject) => {
|
||||||
|
this.openmct.telemetry.request(conditionSetDomainObject)
|
||||||
|
.then(output => this.handleConditionSetResultUpdated(output));
|
||||||
this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(conditionSetDomainObject, output => this.handleConditionSetResultUpdated(output));
|
this.stopProvidingTelemetry = this.openmct.telemetry.subscribe(conditionSetDomainObject, output => this.handleConditionSetResultUpdated(output));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -115,6 +117,7 @@ export default class StyleRuleManager extends EventEmitter {
|
|||||||
if (this.stopProvidingTelemetry) {
|
if (this.stopProvidingTelemetry) {
|
||||||
this.stopProvidingTelemetry();
|
this.stopProvidingTelemetry();
|
||||||
}
|
}
|
||||||
|
delete this.stopProvidingTelemetry;
|
||||||
this.conditionSetIdentifier = undefined;
|
this.conditionSetIdentifier = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user