mirror of
https://github.com/nasa/openmct.git
synced 2025-06-01 23:20:50 +00:00
add a few more awaits
This commit is contained in:
parent
7c01a5e0d7
commit
bf9d5ef4a7
@ -131,6 +131,10 @@ export default class CompsManager extends EventEmitter {
|
||||
await this.#loadComposition();
|
||||
// Check if a newer load has been initiated
|
||||
if (loadVersion !== this.#loadVersion) {
|
||||
console.debug(
|
||||
`🔄 Reloading comps manager in composition wait ${this.#domainObject.name} due to newer load.`
|
||||
);
|
||||
await this.#currentLoadPromise;
|
||||
return;
|
||||
}
|
||||
this.#compositionLoaded = true;
|
||||
@ -141,13 +145,17 @@ export default class CompsManager extends EventEmitter {
|
||||
await this.#startListeningToUnderlyingTelemetry();
|
||||
// Check again for newer load
|
||||
if (loadVersion !== this.#loadVersion) {
|
||||
console.debug(
|
||||
`🔄 Reloading comps manager in telemetry wait ${this.#domainObject.name} due to newer load.`
|
||||
);
|
||||
await this.#currentLoadPromise;
|
||||
return;
|
||||
}
|
||||
this.#loaded = true;
|
||||
console.debug(
|
||||
`✅ Comps manager ${this.#domainObject.name} is ready.`,
|
||||
this.#telemetryCollections
|
||||
);
|
||||
this.#loaded = true;
|
||||
}
|
||||
})();
|
||||
|
||||
|
@ -27,6 +27,7 @@ onconnect = function (e) {
|
||||
} catch (errorInCalculation) {
|
||||
error = errorInCalculation;
|
||||
}
|
||||
console.debug(`📭 Sending response for callback ID ${callbackID}`, result);
|
||||
port.postMessage({ type: responseType, callbackID, result, error });
|
||||
};
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user