mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-21 06:15:15 +00:00
Fix viewBox bug
This commit is contained in:
@@ -39,7 +39,7 @@ class ViewBox extends Component{
|
|||||||
|
|
||||||
let params = viewBox.trim().split(spacesRegExp);
|
let params = viewBox.trim().split(spacesRegExp);
|
||||||
|
|
||||||
if (params.length !== 4 || ![params].some(param => param && numberRegExp.test(param))) {
|
if (params.length !== 4 || !params.some(param => param && numberRegExp.test(param))) {
|
||||||
console.warn('`viewBox` expected a string like `minX minY width height`, but got:' + viewBox);
|
console.warn('`viewBox` expected a string like `minX minY width height`, but got:' + viewBox);
|
||||||
return <G>
|
return <G>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
|
|||||||
Reference in New Issue
Block a user