Add minor improvement to color cleaning migration

This commit is contained in:
Andrey Antukh 2025-06-25 19:26:43 +02:00
parent b52e2fa681
commit 207974fe6c

View file

@ -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"]))