From 57a1ef2538c79372c0ee0a806292b32785321cdb Mon Sep 17 00:00:00 2001 From: Brett Zamir Date: Tue, 29 Aug 2023 16:03:05 -0700 Subject: [PATCH] fix: revert use of too-high language feature; fixes #1148 --- src/jsdocUtils.js | 2 +- src/rules/matchDescription.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/jsdocUtils.js b/src/jsdocUtils.js index a8f6fcc86..9d3f5b4cc 100644 --- a/src/jsdocUtils.js +++ b/src/jsdocUtils.js @@ -595,7 +595,7 @@ const getPreferredTagName = ( }), ); - if (Object.hasOwn(tagPreferenceFixed, name)) { + if (Object.prototype.hasOwnProperty.call(tagPreferenceFixed, name)) { return tagPreferenceFixed[name]; } diff --git a/src/rules/matchDescription.js b/src/rules/matchDescription.js index 63d5a68eb..2b95adbca 100644 --- a/src/rules/matchDescription.js +++ b/src/rules/matchDescription.js @@ -43,7 +43,7 @@ export default iterateJsdoc(({ } if (mainDescriptionMatch === false && ( - !tag || !Object.hasOwn(tags, tag.tag)) + !tag || !Object.prototype.hasOwnProperty.call(tags, tag.tag)) ) { return; }