Use Object.hasOwn() instead of Object.prototype.hasOwnProperty() (#3773)

This commit is contained in:
Jon Koops 2022-11-16 12:12:59 +01:00 committed by GitHub
parent 3207dc121e
commit 71f2db02a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,10 +76,7 @@ const isAttributeArray = (value: any) => {
}
return value.some(
(e) =>
// TODO: Use Object.hasOwn() when Firefox ESR supports it.
Object.prototype.hasOwnProperty.call(e, "key") &&
Object.prototype.hasOwnProperty.call(e, "value")
(e) => Object.hasOwn(e, "key") && Object.hasOwn(e, "value")
);
};