-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multilevel Sort fails on Safari 14 - Object.hasOwn is not a function #6
Comments
We are also running into this issue when sorting for in a node/React Native environment. |
github-actions bot
pushed a commit
that referenced
this issue
Nov 27, 2022
## [1.1.1](v1.1.0...v1.1.1) (2022-11-27) ### Bug Fixes * Support browsers without Object.hasOwn ([b67cfef](b67cfef)), closes [#6](#6)
Thank you very much for an exhaustive description of the problem! I use Safari myself, but the latest version. I added a fallback to The fix got released as 1.1.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When running Storybook with storybook-multilevel-sort on a Safari v14 browser, the error at the bottom of this post is shown.
The issue is simple - Safari v14 doesn't have an object.hasOwn() method.
It's pretty easy to workaround by adding the following polyfill before loading storybook-multilevel-sort
The solution is to use Object.hasOwnProperty() instead of Object.hasOwn() in the following code
storybook-multilevel-sort/lib/index.js
Line 3 in d94e803
I'd be happy to have the code authors make this change, or I could issue a pull request. The fix doesn't appear to cause any backward compatibility issues.
Here's the full text of the error in case someone lands on this issue from a search. Also attached a screen shot of how this looks on a Safari v14 browser.
The text was updated successfully, but these errors were encountered: