From adfe2b494bb0a4a895dc5340bb3dcf6783455c9e Mon Sep 17 00:00:00 2001 From: unitwk Date: Fri, 17 Nov 2023 13:32:17 +0800 Subject: [PATCH] Fix: select len check --- frontend/src/components/NewCardList/params.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/components/NewCardList/params.vue b/frontend/src/components/NewCardList/params.vue index cea5f7a4..f32dd28e 100644 --- a/frontend/src/components/NewCardList/params.vue +++ b/frontend/src/components/NewCardList/params.vue @@ -17,7 +17,7 @@ const formRef = ref(); const openInstanceSelectDialog = async () => { try { const selectedInstances = await useSelectInstances(); - if (selectedInstances) { + if (selectedInstances && selectedInstances.length > 0) { formData.value.instanceId = selectedInstances[0].instanceUuid; formData.value.daemonId = selectedInstances[0].daemonId; }