From 0b081d24e0184d8d57d7152f2b73336a079d4f4c Mon Sep 17 00:00:00 2001 From: Florian Schroedl Date: Wed, 2 Oct 2024 10:03:34 +0200 Subject: [PATCH] Only show warning when string has / --- frontend/src/app/main/ui/workspace/tokens/sets.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/tokens/sets.cljs b/frontend/src/app/main/ui/workspace/tokens/sets.cljs index 40c3a46ef..75854e941 100644 --- a/frontend/src/app/main/ui/workspace/tokens/sets.cljs +++ b/frontend/src/app/main/ui/workspace/tokens/sets.cljs @@ -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}])]))