0
Fork 0
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:
Andrés Moya 2023-11-14 14:43:11 +01:00 committed by Andrey Antukh
parent 0dfe231dc3
commit 08f12f4f6c

View file

@ -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?