From cedb1f51e77a2cf589ed681559f5df8d2e88e12a Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sun, 4 Feb 2024 16:44:40 +0100 Subject: [PATCH] chore(core): cleanup EdgeWrapper --- packages/core/src/components/Edges/EdgeWrapper.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/core/src/components/Edges/EdgeWrapper.ts b/packages/core/src/components/Edges/EdgeWrapper.ts index f75c28bd..ea14a05b 100644 --- a/packages/core/src/components/Edges/EdgeWrapper.ts +++ b/packages/core/src/components/Edges/EdgeWrapper.ts @@ -44,7 +44,6 @@ const EdgeWrapper = defineComponent({ findNode, isValidConnection, multiSelectionActive, - hooks: flowHooks, } = useVueFlow() const hooks = useEdgeHooks(props.edge, emits) @@ -84,21 +83,19 @@ const EdgeWrapper = defineComponent({ const targetNode = findNode(edge.value.target) if (!sourceNode && !targetNode) { - flowHooks.value.error.trigger( - new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.value.id, edge.value.source, edge.value.target), - ) + emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.value.id, edge.value.source, edge.value.target)) return null } if (!sourceNode) { - flowHooks.value.error.trigger(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.value.id, edge.value.source)) + emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.value.id, edge.value.source)) return null } if (!targetNode) { - flowHooks.value.error.trigger(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.value.id, edge.value.target)) + emits.error(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.value.id, edge.value.target)) return null }