2
0

🚑 Fix auto delete invalid edge when offsets are not loaded

This commit is contained in:
Baptiste Arnaud
2024-03-11 15:06:24 +01:00
parent 595bffc38d
commit 03097718d1

View File

@ -61,6 +61,7 @@ export const Edge = ({ edge, fromGroupId }: Props) => {
}, [edge.from, sourceEndpointYOffsets]) }, [edge.from, sourceEndpointYOffsets])
const targetTop = useMemo(() => { const targetTop = useMemo(() => {
if (targetEndpointYOffsets.size === 0) return
if (edge.to.blockId) { if (edge.to.blockId) {
const targetOffset = targetEndpointYOffsets.get(edge.to.blockId) const targetOffset = targetEndpointYOffsets.get(edge.to.blockId)
if (!targetOffset) { if (!targetOffset) {