0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 06:58:58 -05:00

🐛 Fix pointermap issue on file export

This commit is contained in:
Andrey Antukh 2023-05-09 12:47:33 +02:00
parent 8e0abec876
commit 63f4ef97fb
2 changed files with 4 additions and 2 deletions

View file

@ -300,7 +300,7 @@
(binding [pmap/*load-fn* (partial files/load-pointer conn file-id)]
(some-> (db/get* conn :file {:id file-id})
(files/decode-row)
(update :data files/process-pointers deref)))))
(files/process-pointers deref)))))
(def ^:private sql:file-media-objects
"SELECT * FROM file_media_object WHERE id = ANY(?)")

View file

@ -74,13 +74,15 @@
IPointerMap
(load! [_]
(l/trace :hint "pointer-map:load" :id id)
(set! loaded? true)
(when-not *load-fn*
(throw (UnsupportedOperationException. "load is not supported when *load-fn* is not bind")))
(when-let [data (*load-fn* id)]
(set! odata data))
(set! loaded? true)
(or odata {}))
(modified? [_] modified?)