mirror of
https://github.com/penpot/penpot.git
synced 2025-01-04 13:50:12 -05:00
🐛 Handle correctly pointers when loading libraries
This commit is contained in:
parent
0dfe231dc3
commit
08f12f4f6c
1 changed files with 5 additions and 2 deletions
|
@ -168,8 +168,11 @@
|
|||
(if (contains? (:features file) "fdata/objects-map") omap/wrap identity)]
|
||||
(let [libraries (when with-libraries?
|
||||
(->> (files/get-file-libraries conn (:id file))
|
||||
(map #(files-update/get-file conn (:id %)))
|
||||
(map #(update % :data blob/decode))
|
||||
(into [file] (map (fn [{:keys [id]}]
|
||||
(binding [pmap/*load-fn* (partial files/load-pointer conn id)]
|
||||
(-> (files-update/get-file conn id)
|
||||
(update :data blob/decode)
|
||||
(files/process-pointers deref)))))) ; ensure all pointers resolved
|
||||
(d/index-by :id)))]
|
||||
(try
|
||||
(if with-libraries?
|
||||
|
|
Loading…
Reference in a new issue