mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-27 12:41:49 +00:00
fix: accept comas in viewbox (#1952)
PR adding support for comas in viewbox property, replacing them with space.
This commit is contained in:
@@ -37,7 +37,9 @@ export default function extractViewBox(props: {
|
||||
}
|
||||
|
||||
const params = (
|
||||
Array.isArray(viewBox) ? viewBox : viewBox.trim().split(spacesRegExp)
|
||||
Array.isArray(viewBox)
|
||||
? viewBox
|
||||
: viewBox.trim().replace(/,/g, ' ').split(spacesRegExp)
|
||||
).map(Number);
|
||||
|
||||
if (params.length !== 4 || params.some(isNaN)) {
|
||||
|
||||
Reference in New Issue
Block a user