From 6bf7e95a74122ecba655afca507d5d8455c205d7 Mon Sep 17 00:00:00 2001 From: Alejandro Alonso Date: Tue, 28 Nov 2023 07:50:57 +0100 Subject: [PATCH] :bug: Fix code gen when just one fill --- frontend/src/app/util/code_gen/style_css_values.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/util/code_gen/style_css_values.cljs b/frontend/src/app/util/code_gen/style_css_values.cljs index 0ed0d7608..2b4586c8a 100644 --- a/frontend/src/app/util/code_gen/style_css_values.cljs +++ b/frontend/src/app/util/code_gen/style_css_values.cljs @@ -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]