Skip to content

Commit

Permalink
Update lib/internal/url.js
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
anonrig and aduh95 authored Apr 25, 2024
1 parent b0f5fed commit b5265c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/internal/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ class URL {
const out = URL.parse(path);
// Only return origin of scheme is `http` or `https`
// Otherwise return a new opaque origin (null).
if (out && (out.#context.scheme_type === 0 || out.#context.scheme_type === 2)) {
if (out?.#context.scheme_type === 0 || out?.#context.scheme_type === 2) {
return `${out.protocol}//${out.host}`;
}
}
Expand Down

0 comments on commit b5265c6

Please sign in to comment.