0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

🐛 Fix empty components on v2 migration

This commit is contained in:
Alejandro Alonso 2024-02-07 09:44:16 +01:00 committed by Andrés Moya
parent 07693a46f2
commit bdb16109d5

View file

@ -414,6 +414,16 @@
(update :pages-index update-vals fix-container)
(d/update-when :components update-vals fix-container))))
fix-empty-components
(fn [file-data]
(letfn [(fix-component [components id component]
(if (empty? (:objects component))
(dissoc components id)
components))]
(-> file-data
(d/update-when :components #(reduce-kv fix-component % %)))))
fix-misc-shape-issues
(fn [file-data]
(letfn [(fix-container [container]
@ -919,6 +929,7 @@
(fix-broken-paths)
(fix-big-geometry-shapes)
(fix-shape-geometry)
(fix-empty-components)
(fix-completly-broken-shapes)
(fix-bad-children)
(fix-broken-parents)