0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 17:21:17 -05:00

🐛 Fix in dashboard it is possible to update project with empty name on left sidebar

This commit is contained in:
Pablo Alba 2024-03-01 12:27:48 +01:00
parent 42b68a786e
commit b2ad78d947

View file

@ -34,6 +34,7 @@
[app.util.timers :as ts]
[beicon.v2.core :as rx]
[cljs.spec.alpha :as s]
[cuerdas.core :as str]
[goog.functions :as f]
[potok.v2.core :as ptk]
[rumext.v2 :as mf]))
@ -91,8 +92,9 @@
(mf/use-callback
(mf/deps item)
(fn [name]
(st/emit! (-> (dd/rename-project (assoc item :name name))
(with-meta {::ev/origin "dashboard:sidebar"})))
(when-not (str/blank? name)
(st/emit! (-> (dd/rename-project (assoc item :name name))
(with-meta {::ev/origin "dashboard:sidebar"}))))
(swap! local* assoc :edition? false)))
on-drag-enter