File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const {
30
30
TextDecoder,
31
31
TextEncoder,
32
32
} = require ( 'internal/encoding' ) ;
33
+ const { URL } = require ( 'internal/url' ) ;
33
34
34
35
const {
35
36
makeTransferable,
@@ -77,7 +78,6 @@ const kMaxChunkSize = 65536;
77
78
const disallowedTypeCharacters = / [ ^ \u{0020} - \u{007E} ] / u;
78
79
79
80
let ReadableStream ;
80
- let URL ;
81
81
82
82
const enc = new TextEncoder ( ) ;
83
83
let dec ;
@@ -86,11 +86,6 @@ let dec;
86
86
// references between the url, internal/blob, and buffer
87
87
// modules, lazy loading here makes sure that things work.
88
88
89
- function lazyURL ( id ) {
90
- URL ??= require ( 'internal/url' ) . URL ;
91
- return new URL ( id ) ;
92
- }
93
-
94
89
function lazyReadableStream ( options ) {
95
90
// eslint-disable-next-line no-global-assign
96
91
ReadableStream ??=
@@ -378,7 +373,7 @@ ObjectDefineProperties(Blob.prototype, {
378
373
function resolveObjectURL ( url ) {
379
374
url = `${ url } ` ;
380
375
try {
381
- const parsed = new lazyURL ( url ) ;
376
+ const parsed = new URL ( url ) ;
382
377
383
378
const split = StringPrototypeSplit ( parsed . pathname , ':' ) ;
384
379
You can’t perform that action at this time.
0 commit comments