diff --git a/CHANGES.md b/CHANGES.md index 14bba836bf..e2ac773f4f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -19,6 +19,7 @@ - Fix long file names being clipped when longer than allowed length [Taiga #10662](https://tree.taiga.io/project/penpot/issue/10662) - Fix problem with error detail in toast [Taiga #10519](https://tree.taiga.io/project/penpot/issue/10519) - Fix view mode error when an external user tries to export something from a prototype using a shared link [Taiga #10251](https://tree.taiga.io/project/penpot/issue/10251) +- Fix merge path nodes with only one node selected [Taiga #9626](https://tree.taiga.io/project/penpot/issue/9626) ## 2.6.1 diff --git a/frontend/src/app/util/path/tools.cljs b/frontend/src/app/util/path/tools.cljs index 78d1064004..11975774ab 100644 --- a/frontend/src/app/util/path/tools.cljs +++ b/frontend/src/app/util/path/tools.cljs @@ -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)))