mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-29 13:21:50 +00:00
fix rgba fill and stroke bug
This commit is contained in:
@@ -9,17 +9,14 @@ const fillRules = {
|
||||
|
||||
function fillFilter(props) {
|
||||
let {fill} = props;
|
||||
let fillOpacity = +props.fillOpacity;
|
||||
|
||||
if (fill === 'none') {
|
||||
return null;
|
||||
} else if (fill) {
|
||||
return patterns(fill, +props.fillOpacity, props.svgId);
|
||||
return patterns(fill, fillOpacity, props.svgId);
|
||||
} else if (props.fill === undefined) {
|
||||
let fillOpacity = +props.fillOpacity;
|
||||
if (isNaN(fillOpacity)) {
|
||||
fillOpacity = 1;
|
||||
}
|
||||
return rgba('#000', fillOpacity).rgbaString();
|
||||
return rgba('#000', isNaN(fillOpacity) ? 1 : fillOpacity).rgbaString();
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user