mirror of
https://github.com/penpot/penpot.git
synced 2025-03-18 10:41:29 -05:00
🐛 Fix components with compont-root on library for v2 migration
This commit is contained in:
parent
bdb16109d5
commit
0c682ea75d
1 changed files with 13 additions and 0 deletions
|
@ -424,6 +424,18 @@
|
|||
(-> file-data
|
||||
(d/update-when :components #(reduce-kv fix-component % %)))))
|
||||
|
||||
fix-components-with-component-root
|
||||
;;In v1 no components in the library should have component-root
|
||||
(fn [file-data]
|
||||
(letfn [(fix-container [container]
|
||||
(d/update-when container :objects update-vals fix-shape))
|
||||
|
||||
(fix-shape [shape]
|
||||
(dissoc shape :component-root))]
|
||||
|
||||
(-> file-data
|
||||
(update :components update-vals fix-container))))
|
||||
|
||||
fix-misc-shape-issues
|
||||
(fn [file-data]
|
||||
(letfn [(fix-container [container]
|
||||
|
@ -930,6 +942,7 @@
|
|||
(fix-big-geometry-shapes)
|
||||
(fix-shape-geometry)
|
||||
(fix-empty-components)
|
||||
(fix-components-with-component-root)
|
||||
(fix-completly-broken-shapes)
|
||||
(fix-bad-children)
|
||||
(fix-broken-parents)
|
||||
|
|
Loading…
Add table
Reference in a new issue