From 9ebe21eb5b0a6a125873e1d2914c6bf928028774 Mon Sep 17 00:00:00 2001 From: Khalid Adil Date: Wed, 12 Jul 2023 19:45:18 -0500 Subject: [PATCH] Add check for activeRole --- .../operatorStatus/operatorStatus/OperatorStatus.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue b/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue index 6e3f1e2214..44e6e013f5 100644 --- a/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue +++ b/src/plugins/operatorStatus/operatorStatus/OperatorStatus.vue @@ -116,8 +116,6 @@ export default { this.indicator.text(pollQuestion?.question || ''); }, async fetchMyStatus() { - const activeRole = await this.openmct.user.getActiveRole(); - this.role = activeRole; // hide indicator for observer if (!this.openmct.user.canProvideStatusForRole()) { this.indicator.text(''); @@ -126,7 +124,12 @@ export default { return; } - console.log(activeRole); + const activeRole = await this.openmct.user.getActiveRole(); + if (!activeRole) { + return; + } + + this.role = activeRole; const status = await this.openmct.user.status.getStatusForRole(activeRole); if (status !== undefined) { this.setStatus({ status });