0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 00:10:11 -05:00

Merge pull request #3860 from penpot/superalex-fix-code-gen-when-just-one-fill

🐛 Fix code gen when just one fill
This commit is contained in:
Alejandro 2023-11-28 09:10:13 +01:00 committed by GitHub
commit a9fc46f7e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -146,8 +146,9 @@
(defmethod get-value :background
[_ {:keys [fills] :as shape} _]
(when (and (not (cgc/svg-markup? shape)) (not (cfh/group-shape? shape)))
(fill->color (first fills))))
(let [single-fill? (= (count fills) 1)]
(when (and (not (cgc/svg-markup? shape)) (not (cfh/group-shape? shape)) single-fill?)
(fill->color (first fills)))))
(defn get-stroke-data
[stroke]