From 2cd0bc565d1e6bcd8603dfd23caff358f150e74a Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Mon, 8 Apr 2024 08:58:53 +0200 Subject: [PATCH] :bug: Fix change shadow color from selected colors --- frontend/src/app/main/data/workspace/colors.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/data/workspace/colors.cljs b/frontend/src/app/main/data/workspace/colors.cljs index 3a8bf6e13..287b6c344 100644 --- a/frontend/src/app/main/data/workspace/colors.cljs +++ b/frontend/src/app/main/data/workspace/colors.cljs @@ -273,7 +273,8 @@ ;; color attrs (cond-> attrs (:gradient attrs) (get-in [:gradient :stops 0])) - new-attrs (merge (get-in shape [:shadow index :color]) attrs)] + new-attrs (-> (merge (get-in shape [:shadow index :color]) attrs) + (d/without-nils))] (assoc-in shape [:shadow index :color] new-attrs)))))))) (defn add-shadow @@ -602,7 +603,8 @@ (merge data) (materialize-color-components)))) (-> state - (dissoc :gradient :stops :editing-stop))))))) + (dissoc :gradient :stops :editing-stop) + (assoc :type :color))))))) ptk/WatchEvent (watch [_ state _] (when add-recent?