mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 13:56:11 +02:00
🐛 Fix incorrect local library indexing on components-v2 migration
This commit is contained in:
parent
76bca216cb
commit
9d05e2260c
1 changed files with 13 additions and 13 deletions
|
@ -632,21 +632,21 @@
|
|||
cfeat/*wrap-with-objects-map-fn*
|
||||
(if (contains? (:features file) "fdata/objectd-map") omap/wrap identity)]
|
||||
|
||||
(let [libs (sequence
|
||||
(map (fn [{:keys [id] :as lib}]
|
||||
(let [file (-> file
|
||||
(update :data blob/decode)
|
||||
(update :data assoc :id id)
|
||||
(pmg/migrate-file))
|
||||
|
||||
libs (->> (files/get-file-libraries conn id)
|
||||
(into [file] (map (fn [{:keys [id]}]
|
||||
(binding [pmap/*load-fn* (partial files/load-pointer conn id)]
|
||||
(-> (db/get conn :file {:id id})
|
||||
(files/decode-row)
|
||||
(files/process-pointers deref) ; ensure all pointers resolved
|
||||
(pmg/migrate-file)))))
|
||||
(files/get-file-libraries conn id))
|
||||
|
||||
libs (-> (d/index-by :id libs)
|
||||
(assoc (:id file) file))
|
||||
(pmg/migrate-file))))))
|
||||
(d/index-by :id))
|
||||
|
||||
file (-> file
|
||||
(update :data blob/decode)
|
||||
(update :data assoc :id id)
|
||||
(update :data migrate-file-data libs)
|
||||
(update :features conj "components/v2"))]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue