Skip to content

Commit cedb1f5

Browse files
committed
chore(core): cleanup EdgeWrapper
1 parent 0544fbd commit cedb1f5

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packages/core/src/components/Edges/EdgeWrapper.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const EdgeWrapper = defineComponent({
4444
findNode,
4545
isValidConnection,
4646
multiSelectionActive,
47-
hooks: flowHooks,
4847
} = useVueFlow()
4948

5049
const hooks = useEdgeHooks(props.edge, emits)
@@ -84,21 +83,19 @@ const EdgeWrapper = defineComponent({
8483
const targetNode = findNode(edge.value.target)
8584

8685
if (!sourceNode && !targetNode) {
87-
flowHooks.value.error.trigger(
88-
new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.value.id, edge.value.source, edge.value.target),
89-
)
86+
emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_TARGET_MISSING, edge.value.id, edge.value.source, edge.value.target))
9087

9188
return null
9289
}
9390

9491
if (!sourceNode) {
95-
flowHooks.value.error.trigger(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.value.id, edge.value.source))
92+
emits.error(new VueFlowError(ErrorCode.EDGE_SOURCE_MISSING, edge.value.id, edge.value.source))
9693

9794
return null
9895
}
9996

10097
if (!targetNode) {
101-
flowHooks.value.error.trigger(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.value.id, edge.value.target))
98+
emits.error(new VueFlowError(ErrorCode.EDGE_TARGET_MISSING, edge.value.id, edge.value.target))
10299

103100
return null
104101
}

0 commit comments

Comments
 (0)