Skip to content

Commit 1028811

Browse files
fix(autoconnect): should check if triggermode is set from the toolbar drag event directly (#1951)
1 parent 01183f1 commit 1028811

File tree

1 file changed

+3
-4
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

1 file changed

+3
-4
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -642,8 +642,7 @@ const WorkflowContent = React.memo(() => {
642642
if (closestBlock) {
643643
// Don't create edges into trigger blocks
644644
const targetBlockConfig = blockConfig
645-
const isTargetTrigger =
646-
targetBlockConfig?.category === 'triggers' || targetBlockConfig?.triggers?.enabled
645+
const isTargetTrigger = enableTriggerMode || targetBlockConfig?.category === 'triggers'
647646

648647
if (!isTargetTrigger) {
649648
const sourceHandle = determineSourceHandle(closestBlock)
@@ -923,7 +922,7 @@ const WorkflowContent = React.memo(() => {
923922
// Don't create edges into trigger blocks
924923
const targetBlockConfig = getBlock(data.type)
925924
const isTargetTrigger =
926-
targetBlockConfig?.category === 'triggers' || targetBlockConfig?.triggers?.enabled
925+
data.enableTriggerMode === true || targetBlockConfig?.category === 'triggers'
927926

928927
if (!isTargetTrigger) {
929928
const sourceHandle = determineSourceHandle({
@@ -1001,7 +1000,7 @@ const WorkflowContent = React.memo(() => {
10011000
// Don't create edges into trigger blocks
10021001
const targetBlockConfig = getBlock(data.type)
10031002
const isTargetTrigger =
1004-
targetBlockConfig?.category === 'triggers' || targetBlockConfig?.triggers?.enabled
1003+
data.enableTriggerMode === true || targetBlockConfig?.category === 'triggers'
10051004

10061005
if (!isTargetTrigger) {
10071006
const sourceHandle = determineSourceHandle(closestBlock)

0 commit comments

Comments
 (0)