Skip to content

Commit 39717bc

Browse files
committed
Merge branch 'master' of https://github.com/Instabug/instabug-reactnative-private into NetworkLog-responce-code-fix
# Conflicts: # README.md # android/src/main/java/com/instabug/reactlibrary/RNInstabugReactnativeModule.java # index.js # utils/XhrNetworkInterceptor.js
2 parents 4a17a2a + 5a298a1 commit 39717bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

utils/XhrNetworkInterceptor.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,11 @@ const XHRInterceptor = {
8181
}
8282
if (this.readyState === this.DONE) {
8383
duration = (Date.now() - duration);
84-
network.responseCode = this.status;
84+
if (this.status == null) {
85+
network.responseCode = 0;
86+
} else {
87+
network.responseCode = this.status;
88+
}
8589
network.duration = duration;
8690

8791
if (this.response) {

0 commit comments

Comments
 (0)