diff --git a/node_modules/react-native-svg/src/xml.tsx b/node_modules/react-native-svg/src/xml.tsx index 828f104..462be2e 100644 --- a/node_modules/react-native-svg/src/xml.tsx +++ b/node_modules/react-native-svg/src/xml.tsx @@ -133,10 +133,17 @@ export function SvgUri(props: UriProps) { useEffect(() => { uri ? fetchText(uri) - .then(setXml) + .then((xml) => { + if (xml && /xmlns="http:\/\/www.w3.org\/[0-9]*\/svg"/.test(xml)) { + setXml(xml); + return; + } + onError(); + }) .catch(onError) : setXml(null); }, [onError, uri]); + return ; }