mirror of
https://github.com/penpot/penpot.git
synced 2025-06-13 01:31:40 +02:00
Assign proper type to fetched image collections.
This commit is contained in:
parent
417f90e677
commit
c6b1263d33
1 changed files with 3 additions and 3 deletions
|
@ -59,9 +59,9 @@
|
||||||
(defrecord CollectionsFetched [items]
|
(defrecord CollectionsFetched [items]
|
||||||
rs/UpdateEvent
|
rs/UpdateEvent
|
||||||
(-apply-update [_ state]
|
(-apply-update [_ state]
|
||||||
(reduce (fn [state item]
|
(reduce (fn [state {:keys [id user] :as item}]
|
||||||
(let [id (:id item)
|
(let [type (if (uuid/zero? (:user item)) :builtin :own)
|
||||||
item (assoc item :type :own)]
|
item (assoc item :type type)]
|
||||||
(assoc-in state [:images-collections id] item)))
|
(assoc-in state [:images-collections id] item)))
|
||||||
state
|
state
|
||||||
items)))
|
items)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue