mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 07:06:04 +00:00
Fix viewBox pre condition warning
This commit is contained in:
@@ -34,7 +34,7 @@ export default function(props) {
|
|||||||
.split(spacesRegExp)
|
.split(spacesRegExp)
|
||||||
.map(Number);
|
.map(Number);
|
||||||
|
|
||||||
if (params.length === 4 && params.some(isNaN)) {
|
if (params.length !== 4 || params.some(isNaN)) {
|
||||||
console.warn("Invalid `viewBox` prop:" + viewBox);
|
console.warn("Invalid `viewBox` prop:" + viewBox);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user