fix: when workflow only has trigger node can't save (#24546)

This commit is contained in:
非法操作 2025-08-26 16:41:47 +08:00 committed by GitHub
parent 5a427b8daa
commit 392db7f611
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 7 additions and 1 deletions

View File

@ -38,7 +38,13 @@ export const useNodesSyncDraft = () => {
if (appId) {
const nodes = getNodes()
const hasStartNode = nodes.find(node => node.data.type === BlockEnum.Start)
const startNodeTypes = [
BlockEnum.Start,
BlockEnum.TriggerSchedule,
BlockEnum.TriggerWebhook,
BlockEnum.TriggerPlugin,
]
const hasStartNode = nodes.some(node => startNodeTypes.includes(node.data.type))
if (!hasStartNode)
return