0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-06 14:50:20 -05:00

Merge pull request #222 from tokens-studio/fix-stroke-width-crash

Fix application crashing when stroke width is applied to a shape with…
This commit is contained in:
Akshay Gupta 2024-07-19 00:30:15 +05:30 committed by GitHub
commit 64da0983f3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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