Skip to content

Commit

Permalink
url: fix performance regression
Browse files Browse the repository at this point in the history
PR-URL: #39778
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
  • Loading branch information
mscdex authored and lpinca committed Aug 25, 2021
1 parent eeb86fb commit f581f6d
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 @@ -617,7 +617,7 @@ function onParseHashComplete(flags, protocol, username, password,
}

function isURLThis(self) {
return self?.[context] !== undefined;
return (self !== undefined && self !== null && self[context] !== undefined);
}

class URL {
Expand Down

0 comments on commit f581f6d

Please sign in to comment.