mirror of
https://github.com/nasa/openmct.git
synced 2025-04-20 17:11:11 +00:00
remove unecessary get call
This commit is contained in:
parent
6095872682
commit
1dc9743484
@ -44,19 +44,16 @@ export default class ConditionManager extends EventEmitter {
|
||||
}
|
||||
|
||||
initialize() {
|
||||
this.openmct.objects.get(this.domainObject.identifier)
|
||||
.then((obj) => {
|
||||
this.observeForChanges(obj);
|
||||
if (this.domainObject.configuration.conditionCollection.length) {
|
||||
this.domainObject.configuration.conditionCollection.forEach((conditionConfigurationId, index) => {
|
||||
this.openmct.objects.get(conditionConfigurationId).then((conditionConfiguration) => {
|
||||
this.initCondition(conditionConfiguration, index);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.addCondition(true);
|
||||
}
|
||||
this.observeForChanges(this.domainObject);
|
||||
if (this.domainObject.configuration.conditionCollection.length) {
|
||||
this.domainObject.configuration.conditionCollection.forEach((conditionConfigurationId, index) => {
|
||||
this.openmct.objects.get(conditionConfigurationId).then((conditionConfiguration) => {
|
||||
this.initCondition(conditionConfiguration, index);
|
||||
});
|
||||
});
|
||||
} else {
|
||||
this.addCondition(true);
|
||||
}
|
||||
}
|
||||
|
||||
observeForChanges(domainObject) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user