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

🐛 Fix user can set a blank name for the component in assets

This commit is contained in:
Pablo Alba 2023-11-06 19:27:26 +01:00 committed by Andrey Antukh
parent 6b09ebb75d
commit 3192b55836

View file

@ -490,8 +490,9 @@
(mf/deps current-component-id)
(fn [new-name]
(swap! state* dissoc :renaming)
(st/emit!
(dwl/rename-component-and-main-instance current-component-id new-name))))
(when (not (str/blank? new-name))
(st/emit!
(dwl/rename-component-and-main-instance current-component-id new-name)))))
on-context-menu
(mf/use-fn