Skip to content

Commit

Permalink
connected_port_names can be None
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecea committed Oct 23, 2023
1 parent 7f9895d commit bf17d43
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gdsfactory/routing/route_fiber_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ def has_p(side) -> bool:
ordered_ports = [component.ports[i] for i in connected_port_names]

for io_gratings in io_gratings_lines:
for i in range(min(N, len(connected_port_names))):
for i in range(
min(N, len(connected_port_names)) if connected_port_names else N
):
p0 = io_gratings[i].ports[gc_port_name]
p1 = ordered_ports[i]
waypoints = generate_manhattan_waypoints(
Expand Down

0 comments on commit bf17d43

Please sign in to comment.