From 6795ebbf7f0e475d9b456e91fb94a59208d415a5 Mon Sep 17 00:00:00 2001 From: Ahmed Awan Date: Thu, 16 Nov 2023 11:59:26 -0600 Subject: [PATCH] use try..catch..finally instead of just the await --- client/src/components/Panels/ToolPanel.vue | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/client/src/components/Panels/ToolPanel.vue b/client/src/components/Panels/ToolPanel.vue index 94acaca77b13..4c67cb1b837e 100644 --- a/client/src/components/Panels/ToolPanel.vue +++ b/client/src/components/Panels/ToolPanel.vue @@ -40,17 +40,14 @@ const query = ref(""); const showAdvanced = ref(false); onMounted(async () => { - await toolStore - .getPanelViews() - .then(async () => { - await initializeTools(); - }) - .catch((error) => { - console.error(error); - }) - .finally(() => { - arePanelsFetched.value = true; - }); + try { + await toolStore.getPanelViews(); + await initializeTools(); + } catch (error) { + console.error(error); + } finally { + arePanelsFetched.value = true; + } }); watch(