Replace .hasOwn() with .hasOwnProperty() (#2882)

This commit is contained in:
Jon Koops 2022-06-28 13:04:34 +02:00 committed by GitHub
parent 489f7ba98b
commit 1d4033201e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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