mirror of
https://github.com/penpot/penpot.git
synced 2026-05-10 10:38:17 +00:00
🐛 Add migration that fixes all frames that does not have :shapes attr
This commit is contained in:
parent
a097ed29a9
commit
6a3b963a77
@ -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…
x
Reference in New Issue
Block a user