From 60fcb0f28f0dbad5e665505a2e14a535da4cdad7 Mon Sep 17 00:00:00 2001 From: Wojciech Lewicki Date: Tue, 3 Jan 2023 21:15:09 +0100 Subject: [PATCH] fix: restore black as a default color for svgs (#1947) PR fixing setting of fill color to black when none is provided to the svg. --- src/lib/extract/extractFill.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/extract/extractFill.ts b/src/lib/extract/extractFill.ts index 3070ab82..a0a5ee59 100644 --- a/src/lib/extract/extractFill.ts +++ b/src/lib/extract/extractFill.ts @@ -20,6 +20,9 @@ export default function extractFill( inherited.push('fill'); o.fill = !fill && typeof fill !== 'number' ? defaultFill : extractBrush(fill); + } else { + // we want the default value of fill to be black to match the spec + o.fill = defaultFill; } if (fillOpacity != null) { inherited.push('fillOpacity');