mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-31 13:52:58 +00:00
Merge pull request #4 from jagan-veeraraghavan/master
FIX: Check for fillOpacity when fill is undefined
This commit is contained in:
@@ -46,6 +46,11 @@ export default function (props) {
|
||||
|
||||
return rgba(props.fill, fillOpacity);
|
||||
} else if (props.fill === undefined) {
|
||||
|
||||
let fillOpacity = +props.fillOpacity;
|
||||
if (isNaN(fillOpacity)) {
|
||||
fillOpacity = 1;
|
||||
}
|
||||
return rgba('#000', fillOpacity);
|
||||
} else {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user