Skip to content

Commit f581f6d

Browse files
mscdexlpinca
authored andcommitted
url: fix performance regression
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>
1 parent eeb86fb commit f581f6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/url.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ function onParseHashComplete(flags, protocol, username, password,
617617
}
618618

619619
function isURLThis(self) {
620-
return self?.[context] !== undefined;
620+
return (self !== undefined && self !== null && self[context] !== undefined);
621621
}
622622

623623
class URL {

0 commit comments

Comments
 (0)