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 b0f5fed commit b5265c6Copy full SHA for b5265c6
lib/internal/url.js
@@ -961,7 +961,7 @@ class URL {
961
const out = URL.parse(path);
962
// Only return origin of scheme is `http` or `https`
963
// Otherwise return a new opaque origin (null).
964
- if (out && (out.#context.scheme_type === 0 || out.#context.scheme_type === 2)) {
+ if (out?.#context.scheme_type === 0 || out?.#context.scheme_type === 2) {
965
return `${out.protocol}//${out.host}`;
966
}
967
0 commit comments