handle issue when endpoints are not set

This commit is contained in:
Mutasem 2021-11-05 12:16:41 +01:00
parent 9755c712e1
commit 0f07c88476

View file

@ -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];