0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-21 06:02:32 -05:00

🐛 Fix name on fnc crashing the process

This commit is contained in:
Florian Schroedl 2024-11-08 10:16:29 +01:00
parent 072cec7a22
commit 456da5a46e

View file

@ -235,10 +235,10 @@ Token names should only contain letters and digits separated by . characters.")}
on-update-name-debounced
(mf/use-fn
(uf/debounce (fn [e]
(let [value (dom/get-target-val e)
errors (validate-name value)]
(when touched-name?
(reset! name-errors errors))))))
(let [value (dom/get-target-val e)
errors (validate-name value)]
(when touched-name?
(reset! name-errors errors))))))
on-update-name
(mf/use-fn
@ -388,7 +388,7 @@ Token names should only contain letters and digits separated by . characters.")}
:on-change on-update-value
:ref value-input-ref}
:render-right (when color?
(mf/fnc color-bullet []
(mf/fnc []
[:div {:class (stl/css :color-bullet)
:on-click #(swap! color-ramp-open? not)}
(if-let [hex (some-> @color tinycolor/valid-color tinycolor/->hex)]