Remove usage of Object.hasOwn in helper files

Instead use the easily available old-fashioned way, calling the method
on Object.prototype.
This commit is contained in:
Philip Chimento 2025-05-14 12:34:01 -07:00 committed by Ms2ger
parent 49a4e1e7c8
commit 37ebe00a15
2 changed files with 2 additions and 2 deletions

View File

@ -15,7 +15,7 @@ defines: [asyncTest, assert.throwsAsync]
* @returns {void}
*/
function asyncTest(testFunc) {
if (!Object.hasOwn(globalThis, "$DONE")) {
if (!Object.prototype.hasOwnProperty.call(globalThis, "$DONE")) {
throw new Test262Error("asyncTest called without async flag");
}
if (typeof testFunc !== "function") {

View File

@ -133,7 +133,7 @@ var TemporalHelpers = {
assert.sameValue(eraName, undefined);
return undefined;
}
assert(Object.hasOwn(TemporalHelpers.CalendarEras, calendarId));
assert(Object.prototype.hasOwnProperty.call(TemporalHelpers.CalendarEras, calendarId));
if (eraName === undefined) {
return undefined;