From a12b42c4d5b5b98c5d359c47160244e0b9afd662 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 10 Dec 2024 14:56:15 +0100 Subject: [PATCH] :sparkles: Simplfy workspace-file-colors ref impl --- frontend/src/app/main/refs.cljs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/frontend/src/app/main/refs.cljs b/frontend/src/app/main/refs.cljs index 5b7cdc14e..050f2c5f2 100644 --- a/frontend/src/app/main/refs.cljs +++ b/frontend/src/app/main/refs.cljs @@ -233,10 +233,8 @@ (l/derived :workspace-data st/state)) (def workspace-file-colors - (l/derived (fn [data] - (when data - (->> (:colors data) - (d/mapm #(assoc %2 :file-id (:id data)))))) + (l/derived (fn [{:keys [id] :as data}] + (some-> (:colors data) (update-vals #(assoc % :file-id id)))) workspace-data =))