From 08f12f4f6c135ed4c1e9ca48d9080fbc445cc286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Moya?= Date: Tue, 14 Nov 2023 14:43:11 +0100 Subject: [PATCH] :bug: Handle correctly pointers when loading libraries --- backend/src/app/srepl/helpers.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/app/srepl/helpers.clj b/backend/src/app/srepl/helpers.clj index 51135abdc..85c9fd28c 100644 --- a/backend/src/app/srepl/helpers.clj +++ b/backend/src/app/srepl/helpers.clj @@ -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?