Skip to content

Commit 9d972e8

Browse files
committed
🐛 fix crash on networkLog because responseBody was being set to undefined
1 parent 7d5c2be commit 9d972e8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ var jsonObject = {
2828
// Modify the url or config here
2929
jsonObject.url = url;
3030
if(!config || !config.method) {
31-
//TO-DO: set method to GET!
3231
jsonObject.method = 'GET';
3332
}
3433
if(config) {
@@ -51,7 +50,7 @@ var jsonObject = {
5150
response: function (response) {
5251
// Modify the reponse object;
5352
jsonObject.responseCode = response.status;
54-
jsonObject.responseBody = response._bodyText;
53+
jsonObject.responseBody = response._bodyText ? response._bodyText : '';
5554
if (Platform.OS === 'android') {
5655
Instabug.networkLog(JSON.stringify(jsonObject));
5756
}

0 commit comments

Comments
 (0)