🐛 Fix broken references on duplicate file

This commit is contained in:
Andrés Moya 2021-10-14 14:32:58 +02:00 committed by Andrey Antukh
parent d0f761172a
commit 192fb07ef1
2 changed files with 42 additions and 29 deletions

View file

@ -39,11 +39,23 @@
[file index]
(letfn [(process-form [form]
(cond-> form
;; Relink Components
;; Relink library items
(and (map? form)
(uuid? (:component-file form)))
(update :component-file #(get index % %))
(and (map? form)
(uuid? (:fill-color-ref-file form)))
(update :fill-color-ref-file #(get index % %))
(and (map? form)
(uuid? (:stroke-color-ref-file form)))
(update :stroke-color-ref-file #(get index % %))
(and (map? form)
(uuid? (:typography-ref-file form)))
(update :typography-ref-file #(get index % %))
;; Relink Image Shapes
(and (map? form)
(map? (:metadata form))