Skip to content

Commit 69e660b

Browse files
authored
fix(browser-vm): vm network fakefetch to be compatible with the axios adapter fetch (#703)
1 parent 51f85e6 commit 69e660b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/browser-vm/src/modules/network.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function networkModule(sandbox: Sandbox) {
2626
}
2727

2828
open() {
29-
// sync request
29+
// sync request
3030
if (arguments[2] === false) {
3131
xhrSet.delete(this);
3232
}
@@ -83,7 +83,7 @@ export function networkModule(sandbox: Sandbox) {
8383
});
8484
}
8585
let controller;
86-
if (!hasOwn(options, 'signal') && window.AbortController) {
86+
if (!(input instanceof Request) && !hasOwn(options, 'signal') && window.AbortController) {
8787
controller = new window.AbortController();
8888
if (!sandbox.options.disableCollect) {
8989
fetchSet.add(controller);

0 commit comments

Comments
 (0)