chore(edge-renderer): accept invalid handleid config
This commit is contained in:
@@ -77,10 +77,10 @@ export function getHandle(bounds: HandleElement[], handleId?: string | null): Ha
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (handleId) {
|
if (bounds.length === 1 || !handleId) {
|
||||||
return bounds.find((d) => d.id === handleId)!;
|
|
||||||
} else if (bounds.length === 1) {
|
|
||||||
return bounds[0];
|
return bounds[0];
|
||||||
|
} else if (handleId) {
|
||||||
|
return bounds.find((d) => d.id === handleId) || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user