Skip to content
Open
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
13 changes: 10 additions & 3 deletions lib/components/primitive-components/NetLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ export class NetLabel extends PrimitiveComponent<typeof netLabelProps> {

const connectedPorts: Port[] = []
for (const connection of connectsTo) {
const port = this.getSubcircuit().selectOne(connection) as Port
if (port) {
connectedPorts.push(port)
const target = this.getSubcircuit().selectOne(connection)
if (!target) continue

// A net selector (e.g. "net.C") resolves to a Net, which has no port
// position of its own - use the ports connected to that net instead
if (target instanceof Net) {
connectedPorts.push(...target.getAllConnectedPorts())
continue
}

connectedPorts.push(target as Port)
}

return connectedPorts
Expand Down
Loading
Loading