File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ const {
3030 TextDecoder,
3131 TextEncoder,
3232} = require ( 'internal/encoding' ) ;
33+ const { URL } = require ( 'internal/url' ) ;
3334
3435const {
3536 makeTransferable,
@@ -77,7 +78,6 @@ const kMaxChunkSize = 65536;
7778const disallowedTypeCharacters = / [ ^ \u{0020} - \u{007E} ] / u;
7879
7980let ReadableStream ;
80- let URL ;
8181
8282const enc = new TextEncoder ( ) ;
8383let dec ;
@@ -86,11 +86,6 @@ let dec;
8686// references between the url, internal/blob, and buffer
8787// modules, lazy loading here makes sure that things work.
8888
89- function lazyURL ( id ) {
90- URL ??= require ( 'internal/url' ) . URL ;
91- return new URL ( id ) ;
92- }
93-
9489function lazyReadableStream ( options ) {
9590 // eslint-disable-next-line no-global-assign
9691 ReadableStream ??=
@@ -378,7 +373,7 @@ ObjectDefineProperties(Blob.prototype, {
378373function resolveObjectURL ( url ) {
379374 url = `${ url } ` ;
380375 try {
381- const parsed = new lazyURL ( url ) ;
376+ const parsed = new URL ( url ) ;
382377
383378 const split = StringPrototypeSplit ( parsed . pathname , ':' ) ;
384379
You can’t perform that action at this time.
0 commit comments