Skip to content

Commit

Permalink
front: fix invalid switch deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
SharglutDev committed Dec 6, 2023
1 parent 1a763d9 commit fdd42e0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion front/src/applications/editor/components/EntitySumUp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ async function getAdditionalEntities(
const trackIDs = flatMap((entity as SwitchEntity).properties.ports, (port) =>
port.track ? [port.track] : []
);
return getEntities<TrackSectionEntity>(infra, trackIDs, 'TrackSection', dispatch);
try {
return getEntities<TrackSectionEntity>(infra, trackIDs, 'TrackSection', dispatch);
} catch (e) {
return {};
}
}
case 'Route': {
const route = entity as RouteEntity;
Expand Down

0 comments on commit fdd42e0

Please sign in to comment.