0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-22 14:57:01 -05:00

🐛 Fix importing frame components with fills from V1 to V2

This commit is contained in:
Alejandro Alonso 2023-11-30 07:52:22 +01:00 committed by Andrés Moya
parent bfc124b907
commit 20d4c67bf3

View file

@ -228,10 +228,10 @@
(if (or (nil? (:parent-id shape)) (ctk/instance-head? shape))
(assoc shape
:type :frame ; Old groups must be converted
:fills [] ; to frames and conform to spec
:hide-in-viewer true
:rx 0
:ry 0)
:fills (or (:fills shape) []) ; to frames and conform to spec
:hide-in-viewer (or (:hide-in-viewer shape) true)
:rx (or (:rx shape) 0)
:ry (or (:ry shape) 0))
shape))]
(-> file-data
(update :pages-index update-vals fix-container)
@ -376,12 +376,7 @@
:main-instance true
:component-root true
:component-file component-file
:component-id component-id
:type :frame ; Old groups must be converted
:fills [] ; to frames and conform to spec
:hide-in-viewer true
:rx 0
:ry 0)
:component-id component-id)
(nil? (:frame-id shape))
(assoc :frame-id frame-id)