diff --git a/config/eslint.js b/config/eslint.js index b55dafdb..ae50151e 100644 --- a/config/eslint.js +++ b/config/eslint.js @@ -731,7 +731,7 @@ export default [ "prefer-exponentiation-operator": ["error"], "prefer-named-capture-group": ["off"], "prefer-numeric-literals": ["error"], - "prefer-object-has-own": ["error"], + "prefer-object-has-own": ["off"], "prefer-object-spread": ["error"], "prefer-promise-reject-errors": ["error"], "prefer-regex-literals": ["error"], diff --git a/src/internal/reflection.js b/src/internal/reflection.js index c8430783..fdfb929e 100644 --- a/src/internal/reflection.js +++ b/src/internal/reflection.js @@ -39,7 +39,7 @@ const typeofString = "string"; * @returns {boolean} `true` if property is an own-property, `false` otherwise. */ export function hasOwn(object, property) { - return Object.hasOwn(object, property); + return Object.prototype.hasOwnProperty.call(object, property); } /**