kentcdodds / match-sorter

Simple, expected, and deterministic best-match sorting of an array in JavaScript
https://npm.im/match-sorter
MIT License
3.73k stars 129 forks source link

Prefer `Object.hasOwnProperty` for additional browser support #151

Closed sjaq closed 8 months ago

sjaq commented 8 months ago

Keeping support for older browsers by reverting the change to Object.hasOwn and disabling the eslint rule for the project.

Fixes: https://github.com/kentcdodds/match-sorter/issues/150

What: Revert back to using Object.hasOwnProperty instead of Object.hasOwn Why: Object.hasOwn is still unsupported by some older legacy browsers that were supported before this change. How: Reverted back the two changed lines and disabled the prefer-object-has-own in the eslint config (could also do this line-by-line, but this prevents it from accidentally being re-introduced in the project).

Checklist:

github-actions[bot] commented 8 months ago

:tada: This PR is included in version 6.3.4 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

sjaq commented 8 months ago

No worries! Thanks for being so quick and responsive as a maintainer!