mirror of
https://github.com/langgenius/dify.git
synced 2026-04-09 01:37:14 +08:00
fix: when workflow only has trigger node can't save (#24546)
This commit is contained in:
parent
5a427b8daa
commit
392db7f611
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user