From 0ceadada35363d4404598204e518c817abcffa55 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Tue, 24 Feb 2026 10:56:38 +0100 Subject: [PATCH] :bug: Fix invalid data on layout flex dir shape property --- common/src/app/common/files/migrations.cljc | 23 ++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc index 1a1efd807d..3655f3ece5 100644 --- a/common/src/app/common/files/migrations.cljc +++ b/common/src/app/common/files/migrations.cljc @@ -1766,6 +1766,26 @@ (update :pages-index d/update-vals update-container) (d/update-when :components d/update-vals update-container)))) +(defmethod migrate-data "0017-fix-layout-flex-dir" + [data _] + (let [fix-layout-flex-dir + (fn [value] + (if (= value :reverse-row) + :row-reverse + value)) + + update-object + (fn [object] + (d/update-when object :layout-flex-dir fix-layout-flex-dir)) + + update-container + (fn [container] + (d/update-when container :objects d/update-vals update-object))] + + (-> data + (update :pages-index d/update-vals update-container) + (d/update-when :components d/update-vals update-container)))) + (def available-migrations (into (d/ordered-set) ["legacy-2" @@ -1839,4 +1859,5 @@ "0014-clear-components-nil-objects" "0015-fix-text-attrs-blank-strings" "0015-clean-shadow-color" - "0016-copy-fills-from-position-data-to-text-node"])) + "0016-copy-fills-from-position-data-to-text-node" + "0017-fix-layout-flex-dir"]))