From 3192b5583643c5b921ae480c3fd1fc9dd2b685ea Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Mon, 6 Nov 2023 19:27:26 +0100 Subject: [PATCH] :bug: Fix user can set a blank name for the component in assets --- .../src/app/main/ui/workspace/sidebar/assets/components.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/workspace/sidebar/assets/components.cljs b/frontend/src/app/main/ui/workspace/sidebar/assets/components.cljs index 9a1c5531f..48315ed3f 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/assets/components.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/assets/components.cljs @@ -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