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 <jasnell@gmail.com>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
  • 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.