Fix empty fill list rendering as default black

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
This commit is contained in:
YohYamasaki
2026-05-19 04:25:36 +02:00
committed by GitHub
co-authored by cubic-dev-ai[bot]
parent 1802829c87
commit 3091a6f2df
@@ -40,7 +40,7 @@ impl RenderExt for List<Color> {
_transformed_bounds: DAffine2, _transformed_bounds: DAffine2,
_render_params: &RenderParams, _render_params: &RenderParams,
) -> Self::Output { ) -> Self::Output {
let Some(color) = self.element(0) else { return String::new() }; let Some(color) = self.element(0) else { return r#" fill="none""#.to_string() };
let mut result = format!(r##" fill="#{}""##, SRGBA8::from(*color).to_rgb_hex()); let mut result = format!(r##" fill="#{}""##, SRGBA8::from(*color).to_rgb_hex());
if color.a() < 1. { if color.a() < 1. {