diff --git a/common/src/app/common/files/libraries_helpers.cljc b/common/src/app/common/files/libraries_helpers.cljc index 77ffcbe87..b7f9bdc87 100644 --- a/common/src/app/common/files/libraries_helpers.cljc +++ b/common/src/app/common/files/libraries_helpers.cljc @@ -2046,3 +2046,12 @@ (-> changes (generate-new-shape-for-swap shape file page libraries id-new-component index target-cell keep-props-values))] [new-shape all-parents changes])) + +(defn generate-sync-head + [changes file-full libraries container head components-v2] + (let [changes + (-> changes + (pcb/with-container container) + (pcb/with-objects (:objects container)) + (generate-sync-shape-direct file-full libraries container (:id head) false components-v2))] + changes)) \ No newline at end of file diff --git a/frontend/src/app/main/data/workspace/libraries.cljs b/frontend/src/app/main/data/workspace/libraries.cljs index ad2e37a7d..44a58bdd6 100644 --- a/frontend/src/app/main/data/workspace/libraries.cljs +++ b/frontend/src/app/main/data/workspace/libraries.cljs @@ -695,9 +695,7 @@ changes (-> (pcb/empty-changes it) - (pcb/with-container container) - (pcb/with-objects (:objects container)) - (cflh/generate-sync-shape-direct file-full libraries container (:id head) false components-v2))] + (cflh/generate-sync-head file-full libraries container head components-v2))] (log/debug :msg "SYNC-head finished" :js/rchanges (log-changes (:redo-changes changes)