Skip to content

Commit bd13193

Browse files
BridgeARMylesBorins
authored andcommitted
lib: remove unnecessary require
The call to url was not necessary since the `url` module itself was already taking care of this. PR-URL: #20567 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 0753774 commit bd13193

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

lib/internal/bootstrap/node.js

-4
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,6 @@
8989
setupGlobalURL();
9090
}
9191

92-
// Ensure setURLConstructor() is called before the native
93-
// URL::ToObject() method is used.
94-
NativeModule.require('internal/url');
95-
9692
// On OpenBSD process.execPath will be relative unless we
9793
// get the full path before process.execPath is used.
9894
if (process.platform === 'openbsd') {

lib/url.js

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ const {
3030
ERR_INVALID_ARG_TYPE
3131
} = require('internal/errors').codes;
3232

33+
// This ensures setURLConstructor() is called before the native
34+
// URL::ToObject() method is used.
3335
const { spliceOne } = require('internal/util');
3436

3537
// WHATWG URL implementation provided by internal/url

0 commit comments

Comments
 (0)