Skip to content

Commit 5a298a1

Browse files
authored
📝 fix network log response code retrieval (#61)
1 parent 1e5bfae commit 5a298a1

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)