🐛 Fix duplicate a variant when all have bad formulae crashes

This commit is contained in:
Pablo Alba 2025-08-18 16:52:52 +02:00 committed by Pablo Alba
parent 59f2ee87e6
commit b3b183c151

View File

@ -31,9 +31,11 @@
component-id
new-component-id
{:new-shape-id new-shape-id :apply-changes-local-library? true}))]
(-> changes
(clvp/generate-update-property-value new-component-id prop-num value)
(pcb/change-parent (:parent-id shape) [new-shape] 0))))
(cond-> changes
(>= prop-num 0)
(clvp/generate-update-property-value new-component-id prop-num value)
:always
(pcb/change-parent (:parent-id shape) [new-shape] 0))))
(defn- generate-path
[path objects base-id shape]