summaryrefslogtreecommitdiff
path: root/lib/stitches/auto_run.py
diff options
context:
space:
mode:
authorKaalleen <36401965+kaalleen@users.noreply.github.com>2023-06-04 13:38:49 +0200
committerGitHub <noreply@github.com>2023-06-04 13:38:49 +0200
commitc192d77afbd9ad8f2554016c2d060ae9ea711125 (patch)
treef5edaba48712133f12019bf8eeaa9b9f1ef3160d /lib/stitches/auto_run.py
parentf68b099dbf3abf1f7f13e8327f535772622744af (diff)
fix #2335 (#2336)
Diffstat (limited to 'lib/stitches/auto_run.py')
-rw-r--r--lib/stitches/auto_run.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/stitches/auto_run.py b/lib/stitches/auto_run.py
index 82c7fc7e..d833a885 100644
--- a/lib/stitches/auto_run.py
+++ b/lib/stitches/auto_run.py
@@ -208,7 +208,11 @@ def path_to_elements(graph, path, trim): # noqa: C901
for start, end, direction in path:
check_stop_flag()
- element = graph[start][end].get('element')
+ try:
+ element = graph[start][end].get('element')
+ except KeyError:
+ # runs with the preserve order option may need this
+ element = graph[end][start].get('element')
start_coord = graph.nodes[start]['point']
end_coord = graph.nodes[end]['point']
# create a new element if we hit an other original element to keep it's properties