Files
mattermost-mobile/patches/react-native-svg+12.4.3.patch
Elias Nahum dcc05956b6 Gekidou upgrade RN to 0.69.3 and dependencies (#6537)
* module dependencies

* update fastlane

* upgrade types dependencies

* update dev deps

* update react-native-notifications

* update react-native-keychain

* update sentry

* update detox

* Upgrade to RN 69.3

* increase MaxMetaspaceSize gradle opts

* feedback review
2022-08-08 09:06:20 -04:00

22 lines
712 B
Diff

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