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

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