Преглед изворни кода

fix #2397: make Request work in incognito

tophf пре 1 месец
родитељ
комит
017f4605cd
1 измењених фајлова са 3 додато и 4 уклоњено
  1. 3 4
      src/background/utils/url.js

+ 3 - 4
src/background/utils/url.js

@@ -15,10 +15,9 @@ addOwnCommands({
       ? requestLimited
       : request;
     const res = await fn(vettedUrl, opts);
-    if (opts[kResponseType] === 'blob') {
-      res.data = await makeRaw(res);
-    }
-    return res;
+    return opts[kResponseType] === 'blob'
+      ? makeRaw(res)
+      : res.data; // TODO: if we ever need headers, send it as [...headers] to make it transferable
   },
 });