mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-18 13:05:10 +00:00
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.
This commit is contained in:
@@ -20,6 +20,9 @@ export default function extractFill(
|
|||||||
inherited.push('fill');
|
inherited.push('fill');
|
||||||
o.fill =
|
o.fill =
|
||||||
!fill && typeof fill !== 'number' ? defaultFill : extractBrush(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) {
|
if (fillOpacity != null) {
|
||||||
inherited.push('fillOpacity');
|
inherited.push('fillOpacity');
|
||||||
|
|||||||
Reference in New Issue
Block a user