diff --git a/src/uxbox/ui/workspace/recent_colors.cljs b/src/uxbox/ui/workspace/recent_colors.cljs index 595fba0ea8..1e6781006c 100644 --- a/src/uxbox/ui/workspace/recent_colors.cljs +++ b/src/uxbox/ui/workspace/recent_colors.cljs @@ -27,10 +27,10 @@ (defn- calculate-colors [shapes] - (as-> (comp - #(count-color %1 %2 :fill) - #(count-color %1 %2 :stroke)) $ - (reduce $ {} shapes) + (as-> {} $ + (reduce #(count-color %1 %2 :fill) $ shapes) + (reduce #(count-color %1 %2 :stroke) $ shapes) + (remove nil? $) (sort-by second (into [] $)) (take 5 (map first $))))