Skip to content

Commit

Permalink
lib: remove unnecessary require
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
BridgeAR authored and MylesBorins committed May 22, 2018
1 parent 0753774 commit bd13193
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/internal/bootstrap/node.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@
setupGlobalURL();
}

// Ensure setURLConstructor() is called before the native
// URL::ToObject() method is used.
NativeModule.require('internal/url');

// On OpenBSD process.execPath will be relative unless we
// get the full path before process.execPath is used.
if (process.platform === 'openbsd') {
Expand Down
2 changes: 2 additions & 0 deletions lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ const {
ERR_INVALID_ARG_TYPE
} = require('internal/errors').codes;

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

// WHATWG URL implementation provided by internal/url
Expand Down

0 comments on commit bd13193

Please sign in to comment.