0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-04 19:11:20 -05:00

Minor fix on colors page initialization event.

This commit is contained in:
Andrey Antukh 2016-10-21 16:41:16 +02:00
parent 02c7793050
commit 2764ea0d96

View file

@ -38,18 +38,12 @@
(defrecord Initialize [type id]
rs/UpdateEvent
(-apply-update [_ state]
(let [type (or type :builtin)
id (or id (if (= type :builtin) 1 nil))
(let [type (or type :own)
data {:type type :id id :selected #{}}]
(-> state
(assoc-in [:dashboard :colors] data)
(assoc-in [:dashboard :section] :dashboard/colors))))
;; rs/EffectEvent
;; (-apply-effect [_ state]
;; (when (nil? (:color-colls-by-id state))
;; (reset! st/loader true)))
rs/WatchEvent
(-apply-watch [_ state s]
(rx/of (conditional-fetch))))