We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2a1f71 commit 9d806dfCopy full SHA for 9d806df
lib/internal/url.js
@@ -78,6 +78,7 @@ const {
78
} = require('internal/validators');
79
80
const querystring = require('querystring');
81
+const console = require('console');
82
83
const { platform } = process;
84
const isWindows = platform === 'win32';
@@ -840,10 +841,13 @@ class URL {
840
841
if (path.length > 0) {
842
try {
843
const out = new URL(path);
844
+ if (out.#context.scheme_type === 0 || out.#context.scheme_type === 2) {
845
+ return 'null';
846
+ }
847
if (out.#context.scheme_type !== 1) {
848
return `${out.protocol}//${out.host}`;
849
}
- } catch {
850
+ } catch(e) {
851
// Do nothing.
852
853
0 commit comments