mirror of
https://github.com/penpot/penpot.git
synced 2026-02-12 14:42:56 +00:00
Fix up active themes tokens method
This commit is contained in:
@@ -605,14 +605,14 @@
|
||||
(get-active-themes this)))
|
||||
|
||||
(get-active-themes-set-tokens [this]
|
||||
(mapcat (fn [x]
|
||||
(->> (get x :sets)
|
||||
(map (fn [y]
|
||||
(->
|
||||
(get-set this y)
|
||||
:tokens)))))
|
||||
(get-active-themes this)))
|
||||
|
||||
(reduce
|
||||
(fn [acc cur]
|
||||
(if (theme-active? this (:group cur) (:name cur))
|
||||
(into acc
|
||||
(->> (get cur :sets)
|
||||
(map #(-> (get-set this %) :tokens))))
|
||||
acc))
|
||||
(d/ordered-map) (tree-seq d/ordered-map? vals themes)))
|
||||
|
||||
(validate [_]
|
||||
(and (valid-token-sets? sets) ;; TODO: validate set-groups
|
||||
|
||||
Reference in New Issue
Block a user