mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor: Migrate NodeConnectionType to const object type (no-changelog) (#14078)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -68,8 +68,8 @@ import {
|
||||
import { useSourceControlStore } from '@/stores/sourceControl.store';
|
||||
import { useNodeCreatorStore } from '@/stores/nodeCreator.store';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { NodeConnectionType, jsonParse } from 'n8n-workflow';
|
||||
import type { IDataObject, ExecutionSummary, IConnection } from 'n8n-workflow';
|
||||
import { NodeConnectionTypes, jsonParse } from 'n8n-workflow';
|
||||
import type { NodeConnectionType, IDataObject, ExecutionSummary, IConnection } from 'n8n-workflow';
|
||||
import { useToast } from '@/composables/useToast';
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
import { useCredentialsStore } from '@/stores/credentials.store';
|
||||
@@ -990,19 +990,19 @@ async function onAddNodesAndConnections(
|
||||
const mappedConnections: CanvasConnectionCreateData[] = connections.map(({ from, to }) => {
|
||||
const fromNode = editableWorkflow.value.nodes[offsetIndex + from.nodeIndex];
|
||||
const toNode = editableWorkflow.value.nodes[offsetIndex + to.nodeIndex];
|
||||
const type = from.type ?? to.type ?? NodeConnectionType.Main;
|
||||
const type = from.type ?? to.type ?? NodeConnectionTypes.Main;
|
||||
|
||||
return {
|
||||
source: fromNode.id,
|
||||
sourceHandle: createCanvasConnectionHandleString({
|
||||
mode: CanvasConnectionMode.Output,
|
||||
type: isValidNodeConnectionType(type) ? type : NodeConnectionType.Main,
|
||||
type: isValidNodeConnectionType(type) ? type : NodeConnectionTypes.Main,
|
||||
index: from.outputIndex ?? 0,
|
||||
}),
|
||||
target: toNode.id,
|
||||
targetHandle: createCanvasConnectionHandleString({
|
||||
mode: CanvasConnectionMode.Input,
|
||||
type: isValidNodeConnectionType(type) ? type : NodeConnectionType.Main,
|
||||
type: isValidNodeConnectionType(type) ? type : NodeConnectionTypes.Main,
|
||||
index: to.inputIndex ?? 0,
|
||||
}),
|
||||
data: {
|
||||
|
||||
Reference in New Issue
Block a user