File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
packages/browser-vm/src/modules Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ export function networkModule(sandbox: Sandbox) {
37
37
38
38
const url = arguments [ 1 ] ;
39
39
40
- if ( sandbox . options . addSourceList ) {
40
+ if ( sandbox . options . addSourceList ) {
41
41
sandbox . options . addSourceList ( {
42
42
tagName : 'xmlhttprequest' ,
43
43
url,
@@ -73,8 +73,11 @@ export function networkModule(sandbox: Sandbox) {
73
73
if ( needFix ( input ) && baseUrl ) {
74
74
input = transformUrl ( baseUrl , input ) ;
75
75
}
76
- if ( sandbox . options . addSourceList ) {
77
- sandbox . options . addSourceList ( { tagName : 'fetch' , url : input } ) ;
76
+ if ( sandbox . options . addSourceList ) {
77
+ sandbox . options . addSourceList ( {
78
+ tagName : 'fetch' ,
79
+ url : input instanceof Request ? input . url : input ,
80
+ } ) ;
78
81
}
79
82
let controller ;
80
83
if ( ! hasOwn ( options , 'signal' ) && window . AbortController ) {
You can’t perform that action at this time.
0 commit comments