From 7a0a6f5f06929098102a6266475454ebd1cf5e20 Mon Sep 17 00:00:00 2001 From: Ali Abdelfattah Date: Wed, 20 Jul 2022 17:54:30 +0200 Subject: [PATCH] [MOB-9148] Release v11.0.2 (#739) * Bump version * [MOB-9082] Fix a crash on XMLHttpRequest error (#735) * Add a check to ensure `responseBody` validity * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Ali Abdelfattah Co-authored-by: David Mina <36373152+DavidMina96@users.noreply.github.com> --- CHANGELOG.md | 4 ++++ package.json | 2 +- utils/XhrNetworkInterceptor.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a883f517..06cce1447 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 11.0.2 (2022-07-20) + +* Fixes a crash that occurs when logging some failed network requests + ## 11.0.1 (2022-06-13) * Fixes an issue with network responses of type JSON not getting logged diff --git a/package.json b/package.json index 08dc57b4c..092157c44 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "instabug-reactnative", - "version": "11.0.1", + "version": "11.0.2", "description": "React Native plugin for integrating the Instabug SDK", "main": "index.js", "types": "index.d.ts", diff --git a/utils/XhrNetworkInterceptor.js b/utils/XhrNetworkInterceptor.js index e8e6c625d..7c11e560a 100644 --- a/utils/XhrNetworkInterceptor.js +++ b/utils/XhrNetworkInterceptor.js @@ -134,7 +134,7 @@ const XHRInterceptor = { cloneNetwork.requestBodySize = cloneNetwork.requestBody.length; - if(cloneNetwork.responseBodySize === 0){ + if(cloneNetwork.responseBodySize === 0 && cloneNetwork.responseBody){ cloneNetwork.responseBodySize = cloneNetwork.responseBody.length; }