mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
🐛 Add migration that fixes all frames that does not have :shapes
attr
This commit is contained in:
parent
a097ed29a9
commit
6a3b963a77
2 changed files with 16 additions and 1 deletions
|
@ -6,4 +6,4 @@
|
|||
|
||||
(ns app.common.files.defaults)
|
||||
|
||||
(def version 29)
|
||||
(def version 30)
|
||||
|
|
|
@ -561,3 +561,18 @@
|
|||
(-> data
|
||||
(update :pages-index update-vals update-container)
|
||||
(update :components update-vals update-container))))
|
||||
|
||||
(defmethod migrate 30
|
||||
[data]
|
||||
(letfn [(update-object [object]
|
||||
(if (and (cph/frame-shape? object)
|
||||
(not (:shapes object)))
|
||||
(assoc object :shapes [])
|
||||
object))
|
||||
|
||||
(update-container [container]
|
||||
(update container :objects update-vals update-object))]
|
||||
|
||||
(-> data
|
||||
(update :pages-index update-vals update-container)
|
||||
(update :components update-vals update-container))))
|
||||
|
|
Loading…
Add table
Reference in a new issue