diff --git a/lib/internal/url.js b/lib/internal/url.js index ea5cacf30b657b..e23afe3f93e632 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -17,6 +17,7 @@ const { ObjectGetOwnPropertySymbols, ObjectGetPrototypeOf, ObjectKeys, + ObjectPrototypeHasOwnProperty, ReflectApply, ReflectGetOwnPropertyDescriptor, ReflectOwnKeys, @@ -568,6 +569,10 @@ function onParseComplete(flags, protocol, username, password, initSearchParams(this[searchParams], query); } +function isURLThis(self) { + return self != null && ObjectPrototypeHasOwnProperty(self, context); +} + function onParseError(input, flags) { throw new ERR_INVALID_URL(input); }