Browse Source

fix #1865: send readyState=4 for GMxhr redirects, p2

tophf 2 years ago
parent
commit
13a2007bac
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/background/utils/requests.js

+ 1 - 1
src/background/utils/requests.js

@@ -108,7 +108,7 @@ function xhrCallbackWrapper(req, events, blobbed, chunked, isJson) {
     const readyState4 = xhr.readyState === 4 || (sentReadyState4 = false); // reset on redirection
     if (!shouldNotify && !isEnd
     // Firefox duplicates readystatechange for state=4 randomly, #1862
-    || sentReadyState4 && (tmp = (readyState4 && type === 'readystatechange'))) {
+    || (tmp = (readyState4 && type === 'readystatechange')) && sentReadyState4) {
       return;
     }
     if (tmp) {