Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app/services/data/node.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ export class NodeService implements OnDestroy {
this.nodesStore.nodes.forEach((node) => {
node.getPorts().forEach((port) => {
const oppositeNode = node.getOppositeNode(port.getTrainrunSection());
if (oppositeNode === undefined) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, I don't think this should ever happen?

getOppositeNode() only returns undefined when the trainrun section doesn't start/end at the node. Here, since we're iterating over the node's ports, the trainrun section necessarily starts or ends at the node.

return;
}
const portAlignments = VisAVisPortPlacement.placePortsOnSourceAndTargetNode(
node,
oppositeNode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2133,7 +2133,6 @@ export class TrainrunSectionsView {

if (!this.editorView.isTemporaryDisableFilteringOfItemsInViewEnabled()) {
if (ts.getSourceNode().isNonStopNode()) {
const node = ts.getSourceNode().getOppositeNode(ts);
retPath = this.transformPathIfSourceNodeFilteredDueNonStopNodesFiltering(ts, retPath);
}
if (ts.getTargetNode().isNonStopNode()) {
Expand Down