-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
fix: add useReducedMotion
compatibility for Safari 13 and older
#2300
fix: add useReducedMotion
compatibility for Safari 13 and older
#2300
Conversation
🦋 Changeset detectedLatest commit: 5fd17bb The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Can you please add a changeset to the PR? 😊 otherwise looks great to me, thanks for the fix! |
@joshuaellis |
Why
Currently, calling
useReducedMotion
on a Safari browser older than v14 causes an error, crashing the app.This pull request adds compatibility checks, so that
useReducedMotion
can be called on older devices without producing an error.Resolves #2299
What
Adds truthy checks to
MediaQueryList.addEventListener
before attempting to call the function. This function is undefined on older browsers.Checklist