File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,13 @@ self.global = self;
12
12
* it will used for `whatwg-fetch` on older RN versions
13
13
*/
14
14
if ( self . Blob && self . Blob . toString ( ) === 'function Blob() { [native code] }' ) {
15
+ /*
16
+ * RN > 0.54 will polyfill Blob.
17
+ * If it is deleted before the RN setup, RN will not add a reference to the original.
18
+ * We will need to be able to restore the original when running RN > 0.54 for networking tools,
19
+ * so add the reference here as react-native will not do it if the original is deleted
20
+ */
21
+ self . originalBlob = self . Blob ;
15
22
delete self . Blob ;
16
23
}
17
24
Original file line number Diff line number Diff line change @@ -15,6 +15,12 @@ global.XMLHttpRequest = global.originalXMLHttpRequest ?
15
15
global .FormData = global .originalFormData ?
16
16
global .originalFormData :
17
17
global .FormData ;
18
+ global .Blob = global .originalBlob ?
19
+ global .originalBlob :
20
+ global .Blob ;
21
+ global .FileReader = global .originalFileReader ?
22
+ global .originalFileReader :
23
+ global .FileReader ;
18
24
```
19
25
20
26
This allows you can open the ` Network ` tab in devtools to inspect requests of ` fetch ` and ` XMLHttpRequest ` .
You can’t perform that action at this time.
0 commit comments