0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

Fix bug on recent colors finder.

This commit is contained in:
Andrey Antukh 2016-01-29 20:07:35 +02:00
parent e51adc2b5f
commit 80faecb9f4

View file

@ -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 $))))