From 207974fe6c99cb1118797784bc757a0aa40b9cfb Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 25 Jun 2025 19:26:43 +0200 Subject: [PATCH] :sparkles: Add minor improvement to color cleaning migration --- common/src/app/common/files/migrations.cljc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/common/src/app/common/files/migrations.cljc b/common/src/app/common/files/migrations.cljc index 96352618ba..800c8552f7 100644 --- a/common/src/app/common/files/migrations.cljc +++ b/common/src/app/common/files/migrations.cljc @@ -1485,7 +1485,7 @@ (update :pages-index d/update-vals update-container) (d/update-when :components d/update-vals update-container)))) -(defmethod migrate-data "0008-fix-library-colors-v3" +(defmethod migrate-data "0008-fix-library-colors-v4" [data _] (letfn [(clear-color-opacity [color] (if (and (contains? color :opacity) @@ -1496,7 +1496,8 @@ (clear-color [color] (-> color (select-keys types.color/library-color-attrs) - (clear-color-opacity)))] + (clear-color-opacity) + (d/without-nils)))] (d/update-when data :colors d/update-vals clear-color))) @@ -1563,4 +1564,4 @@ "0005-deprecate-image-type" "0006-fix-old-texts-fills" "0007-clear-invalid-strokes-and-fills-v2" - "0008-fix-library-colors-v3"])) + "0008-fix-library-colors-v4"]))