🐛 Fix merge path nodes with only one node selected (#6248)

This commit is contained in:
Alejandro 2025-04-10 09:08:44 +02:00 committed by GitHub
parent 43535ae573
commit 97c24c8b9c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 7 deletions

View file

@ -449,11 +449,13 @@
(defn merge-nodes
"Reduces the contiguous segments in points to a single point"
[content points]
(let [point->merge-point (-> content
(get-segments points)
(group-segments)
(calculate-merge-points points))]
(-> content
(separate-nodes points)
(replace-points point->merge-point))))
(let [segments (get-segments content points)]
(if (seq segments)
(let [point->merge-point (-> segments
(group-segments)
(calculate-merge-points points))]
(-> content
(separate-nodes points)
(replace-points point->merge-point)))
content)))