From 431a073a52467fdeeded2f851a8401823f5a6dca Mon Sep 17 00:00:00 2001 From: Jordan Jensen Date: Thu, 2 Nov 2023 15:18:25 -0700 Subject: [PATCH] Destructure msg.data for readability --- .../publishProcess/steps/RestorePythonEnvironment.vue | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/src/components/publishProcess/steps/RestorePythonEnvironment.vue b/web/src/components/publishProcess/steps/RestorePythonEnvironment.vue index 0c5495d277..5a463a9283 100644 --- a/web/src/components/publishProcess/steps/RestorePythonEnvironment.vue +++ b/web/src/components/publishProcess/steps/RestorePythonEnvironment.vue @@ -39,7 +39,9 @@ const logCb = $eventStream.addEventMonitorCallback('publish/restorePythonEnv/log }); const statusCb = $eventStream.addEventMonitorCallback('publish/restorePythonEnv/status', (msg) => { let newCaption: string; - switch (msg.data.status) { + + const { status: packageStatus, name: packageName, version } = msg.data; + switch (packageStatus) { case 'download+install': newCaption = `Downloading and installing package: `; break; @@ -50,9 +52,9 @@ const statusCb = $eventStream.addEventMonitorCallback('publish/restorePythonEnv/ newCaption = `Installing package: `; break; } - newCaption += msg.data.name; - if (msg.data.version) { - newCaption += ` (${msg.data.version})`; + newCaption += packageName; + if (version) { + newCaption += ` (${version})`; } caption.value = newCaption; });