mattermost-mobile/patches/react-native-svg+13.3.0.patch
Elias Nahum 5c7e89d7de
[Gekidou] update deps (#6667)
* Fix login not showing the usernames (#6652)

* update dependencies

* feedback review

* feedback review 2

* remove unused dependencies

* remove duplicate gesture-handler dependency

* add -XX:+HeapDumpOnOutOfMemoryError to gradle

* adjust gradle memory

* update android ci image

* android executor xlarge

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2022-10-13 08:41:18 -03:00

21 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);