mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Delete duplicate code across all commands (#5452)
This commit is contained in:
committed by
GitHub
parent
8494c97821
commit
5194513850
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
|
||||
import { CliWorkflowOperationError, SubworkflowOperationError } from 'n8n-workflow';
|
||||
import type { INode } from 'n8n-workflow';
|
||||
import { START_NODES } from './constants';
|
||||
|
||||
function findWorkflowStart(executionMode: 'integrated' | 'cli') {
|
||||
return function (nodes: INode[]) {
|
||||
@@ -10,7 +11,7 @@ function findWorkflowStart(executionMode: 'integrated' | 'cli') {
|
||||
|
||||
if (executeWorkflowTriggerNode) return executeWorkflowTriggerNode;
|
||||
|
||||
const startNode = nodes.find((node) => node.type === 'n8n-nodes-base.start');
|
||||
const startNode = nodes.find((node) => START_NODES.includes(node.type));
|
||||
|
||||
if (startNode) return startNode;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user