mirror of
https://github.com/penpot/penpot.git
synced 2025-05-26 01:16:11 +02:00
🐛 Add fix for removing v2 remains in v1 files
This commit is contained in:
parent
daf77ecc5f
commit
e4e566240f
1 changed files with 6 additions and 0 deletions
|
@ -302,9 +302,15 @@
|
||||||
0
|
0
|
||||||
gap)))
|
gap)))
|
||||||
|
|
||||||
|
;; Fix name if missing
|
||||||
(nil? (:name shape))
|
(nil? (:name shape))
|
||||||
(assoc :name (d/name (:type 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
|
;; Fix broken fills
|
||||||
(seq (:fills shape))
|
(seq (:fills shape))
|
||||||
(update :fills (fn [fills] (filterv valid-fill? fills)))
|
(update :fills (fn [fills] (filterv valid-fill? fills)))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue