Skip to content

Commit

Permalink
Merge pull request #278 from Instabug/NetworkLog-responce-code-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alyezz authored May 6, 2019
2 parents 4a17a2a + 17db918 commit e3e14d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "instabug-reactnative",
"version": "8.2.6",
"version": "8.2.7",
"description": "React Native plugin for integrating the Instabug SDK",
"main": "index.js",
"types": "index.d.ts",
Expand Down
6 changes: 5 additions & 1 deletion utils/XhrNetworkInterceptor.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,11 @@ const XHRInterceptor = {
}
if (this.readyState === this.DONE) {
duration = (Date.now() - duration);
network.responseCode = this.status;
if (this.status == null) {
network.responseCode = 0;
} else {
network.responseCode = this.status;
}
network.duration = duration;

if (this.response) {
Expand Down

0 comments on commit e3e14d9

Please sign in to comment.