0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-12 07:41:43 -05:00

🐛 Fix old texts with empty fills

This commit is contained in:
Alejandro Alonso 2024-04-10 15:47:16 +02:00 committed by Alonso Torres
parent f6f262f387
commit 928fbd8e38
2 changed files with 5 additions and 5 deletions

View file

@ -287,7 +287,7 @@
(nil? (:fills node))
(assoc :fills (:fills txt/default-text-attrs))
(and (d/not-empty? color-attrs) (nil? (:fills node)))
(and (d/not-empty? color-attrs) (empty? (:fills node)))
(-> (dissoc :fill-color :fill-opacity :fill-color-ref-id :fill-color-ref-file :fill-color-gradient)
(assoc :fills [color-attrs])))))

View file

@ -101,9 +101,6 @@
:textRendering "geometricPrecision"}
fills
(cond
(some? (:fills data))
(:fills data)
;; DEPRECATED: still here for backward compatibility with
;; old penpot files that still has a single color.
(or (some? (:fill-color data))
@ -113,7 +110,10 @@
:fill-color-ref-id :fill-color-ref-file]))]
(nil? (:fills data))
[{:fill-color "#000000" :fill-opacity 1}])
[{:fill-color "#000000" :fill-opacity 1}]
:else
(:fills data))
font (some->> font-id (get fontsdb))