From 32b7aa99c52567256fd4c34ed7d9f133e46a3f14 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Wed, 26 Feb 2025 17:05:51 +0800 Subject: [PATCH] fix: Fix variable-assign-node cannot publish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1052464 --user=刘瑞斌 【应用】-编排应用中存在变量赋值节点,发布应用失败 https://www.tapd.cn/57709429/s/1659401 --- ui/src/workflow/nodes/variable-assign-node/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ui/src/workflow/nodes/variable-assign-node/index.vue b/ui/src/workflow/nodes/variable-assign-node/index.vue index fe54455ef..4c24bd6c7 100644 --- a/ui/src/workflow/nodes/variable-assign-node/index.vue +++ b/ui/src/workflow/nodes/variable-assign-node/index.vue @@ -209,11 +209,14 @@ const nodeCascaderRef = ref() const nodeCascaderRef2 = ref() const validate = async () => { // console.log(replyNodeFormRef.value.validate()) - return Promise.all([ + let ps = [ replyNodeFormRef.value?.validate(), - ...nodeCascaderRef.value.map((item: any) => item.validate()), - ...nodeCascaderRef2.value.map((item: any) => item.validate()) - ]).catch((err: any) => { + ...nodeCascaderRef.value.map((item: any) => item.validate()) + ] + if (nodeCascaderRef2.value) { + ps = [...ps, ...nodeCascaderRef.value.map((item: any) => item.validate())] + } + return Promise.all(ps).catch((err: any) => { return Promise.reject({ node: props.nodeModel, errMessage: err }) }) }