diff --git a/packages/editor-ui/src/views/canvasHelpers.ts b/packages/editor-ui/src/views/canvasHelpers.ts index 8c344fc9cf..a9c36bdb7c 100644 --- a/packages/editor-ui/src/views/canvasHelpers.ts +++ b/packages/editor-ui/src/views/canvasHelpers.ts @@ -226,6 +226,10 @@ export const hideOverlay = (item: Connection | Endpoint, overlayId: string) => { }; export const showOrHideMidpointArrow = (connection: Connection) => { + if (!connection || !connection.endpoints || connection.endpoints.length !== 2) { + return; + } + const hasItemsLabel = !!getOverlay(connection, OVERLAY_RUN_ITEMS_ID); const sourceEndpoint = connection.endpoints[0];