0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-08 07:50:43 -05:00

Fix application crashing when stroke width is applied to a shape without a stroke

This commit is contained in:
Akshay Gupta 2024-07-18 23:13:51 +05:30
parent 2f17b79bef
commit 337e1c9fa0
No known key found for this signature in database

View file

@ -72,8 +72,9 @@
(defn update-stroke-width (defn update-stroke-width
[value shape-ids] [value shape-ids]
(dch/update-shapes shape-ids (fn [shape] (dch/update-shapes shape-ids (fn [shape]
(when (seq (:strokes shape)) (if (seq (:strokes shape))
(assoc-in shape [:strokes 0 :stroke-width] value))))) (assoc-in shape [:strokes 0 :stroke-width] value)
shape))))
(defn update-rotation [value shape-ids] (defn update-rotation [value shape-ids]
(ptk/reify ::update-shape-dimensions (ptk/reify ::update-shape-dimensions