mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 18:48:37 -05: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]
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(reduce (fn [state item]
|
||||
(let [id (:id item)
|
||||
item (assoc item :type :own)]
|
||||
(reduce (fn [state {:keys [id user] :as item}]
|
||||
(let [type (if (uuid/zero? (:user item)) :builtin :own)
|
||||
item (assoc item :type type)]
|
||||
(assoc-in state [:images-collections id] item)))
|
||||
state
|
||||
items)))
|
||||
|
|
Loading…
Add table
Reference in a new issue