diff --git a/common/src/app/common/files/defaults.cljc b/common/src/app/common/files/defaults.cljc index d0ee2994c..3cfaccf20 100644 --- a/common/src/app/common/files/defaults.cljc +++ b/common/src/app/common/files/defaults.cljc @@ -6,4 +6,4 @@ (ns app.common.files.defaults) -(def version 29) +(def version 30) diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc index c2ee6ff84..ae11417ac 100644 --- a/common/src/app/common/files/migrations.cljc +++ b/common/src/app/common/files/migrations.cljc @@ -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))))