From f581f6da94d011684661d48c9557d5aaf0d13c19 Mon Sep 17 00:00:00 2001 From: Brian White Date: Mon, 16 Aug 2021 09:45:55 -0400 Subject: [PATCH] url: fix performance regression MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/39778 Reviewed-By: James M Snell Reviewed-By: Gus Caplan Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater Reviewed-By: Gerhard Stöbich --- lib/internal/url.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/internal/url.js b/lib/internal/url.js index a5e3bb96908e2e..af65358fc4f72b 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -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 {