🐛 Fix problem when editing color in group

This commit is contained in:
alonso.torres 2021-07-07 13:55:00 +02:00 committed by Andrés Moya
parent 163215d5c9
commit 7b9b3dabbe
2 changed files with 4 additions and 1 deletions

View file

@ -798,7 +798,9 @@
edit-color
(fn [new-color]
(let [updated-color (merge new-color (select-keys color [:id :file-id :name]))]
(let [old-data (-> (select-keys color [:id :file-id])
(assoc :name (cp/merge-path-item (:path color) (:name color))))
updated-color (merge new-color old-data)]
(st/emit! (dwl/update-color updated-color file-id))))
delete-color