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

Only show warning when string has /

This commit is contained in:
Florian Schroedl 2024-10-02 10:03:34 +02:00
parent 669594e3c1
commit 0b081d24e0

View file

@ -166,7 +166,8 @@
:on-toggle on-toggle-token-set
:on-submit #(do
;; TODO: We don't support set grouping for now so we rename sets for now
(warn-on-try-create-token-set-group!)
(when (str/includes? (:name %) "/")
(warn-on-try-create-token-set-group!))
(on-update-token-set (avoid-token-set-grouping (:name token-set)) (update % :name avoid-token-set-grouping))
(on-reset))
:on-cancel on-reset}]))
@ -179,7 +180,8 @@
:on-edit on-create
:on-submit #(do
;; TODO: We don't support set grouping for now so we rename sets for now
(warn-on-try-create-token-set-group!)
(when (str/includes? (:name %) "/")
(warn-on-try-create-token-set-group!))
(on-create-token-set (update % :name avoid-token-set-grouping))
(on-reset))
:on-cancel on-reset}])]))