From 6feae7f359734cf064b304b89ef4ca327abedfff Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 11 Feb 2025 15:44:12 +0100 Subject: [PATCH] :bug: Register media-refs on mod-obj --- common/src/app/common/files/changes.cljc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/files/changes.cljc b/common/src/app/common/files/changes.cljc index 501fd24f4..0d48d5daa 100644 --- a/common/src/app/common/files/changes.cljc +++ b/common/src/app/common/files/changes.cljc @@ -685,7 +685,7 @@ (d/update-in-when data [:components component-id] update-container)))) (defn- process-operations - [objects {:keys [id operations] :as change}] + [objects {:keys [page-id id operations] :as change}] (if-let [shape (get objects id)] (let [shape (reduce process-operation shape operations) touched? (-> shape meta ::ctn/touched)] @@ -694,6 +694,10 @@ ;; need to report them for to be used in the second ;; phase of changes procesing (when touched? (some-> *touched-changes* (vswap! conj change))) + + (when (and *state* page-id) + (swap! *state* collect-shape-media-refs shape page-id)) + (assoc objects id shape)) objects))