diff --git a/common/src/app/common/pages/common.cljc b/common/src/app/common/pages/common.cljc index 29319abef..cda7ad1a9 100644 --- a/common/src/app/common/pages/common.cljc +++ b/common/src/app/common/pages/common.cljc @@ -8,7 +8,7 @@ (:require [app.common.uuid :as uuid])) -(def file-version 8) +(def file-version 10) (def default-color "#b1b2b5") ;; $color-gray-20 (def root uuid/zero) diff --git a/common/src/app/common/pages/migrations.cljc b/common/src/app/common/pages/migrations.cljc index 861b5c0b4..1c3ab69ab 100644 --- a/common/src/app/common/pages/migrations.cljc +++ b/common/src/app/common/pages/migrations.cljc @@ -234,7 +234,7 @@ (:shapes shape)))))) (map :id))) - (update-page [[page-id page]] + (calculate-changes [[page-id page]] (let [objects (:objects page) eids (find-empty-groups objects)] @@ -245,7 +245,15 @@ eids)))] (loop [data data] - (let [changes (mapcat update-page (:pages-index data))] + (let [changes (mapcat calculate-changes (:pages-index data))] (if (seq changes) (recur (cp/process-changes data changes)) data))))) + +(defmethod migrate 10 + [data] + (letfn [(update-page [_ page] + (d/update-in-when page [:objects uuid/zero] dissoc :points :selrect))] + (update data :pages-index #(d/mapm update-page %)))) + +