0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-13 16:21:57 -05:00

🐛 Add fix for removing v2 remains in v1 files

This commit is contained in:
Andrés Moya 2024-01-29 09:54:13 +01:00 committed by Andrey Antukh
parent daf77ecc5f
commit e4e566240f

View file

@ -302,9 +302,15 @@
0
gap)))
;; Fix name if missing
(nil? (:name shape))
(assoc :name (d/name (:type shape)))
;; Remove v2 info from components that have been copied and pasted
;; from a v2 file
(some? (:main-instance shape))
(dissoc shape :main-instance)
;; Fix broken fills
(seq (:fills shape))
(update :fills (fn [fills] (filterv valid-fill? fills)))