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:
parent
e51adc2b5f
commit
80faecb9f4
1 changed files with 4 additions and 4 deletions
|
@ -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 $))))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue