We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
isURLThis
1 parent 08bf015 commit b10fe58Copy full SHA for b10fe58
lib/internal/url.js
@@ -16,6 +16,7 @@ const {
16
ObjectGetOwnPropertySymbols,
17
ObjectGetPrototypeOf,
18
ObjectKeys,
19
+ ObjectPrototypeHasOwnProperty,
20
ReflectGetOwnPropertyDescriptor,
21
ReflectOwnKeys,
22
RegExpPrototypeSymbolReplace,
@@ -536,8 +537,7 @@ ObjectDefineProperties(URLSearchParams.prototype, {
536
537
});
538
539
function isURLThis(self) {
- // TODO(@anonrig): Use ObjectPrototypeHasOwnProperty to avoid prototype look
540
- return (self !== undefined && self !== null && self[context] !== undefined);
+ return self != null && ObjectPrototypeHasOwnProperty(self, context);
541
}
542
543
class URL {
0 commit comments