Skip to content

Commit

Permalink
format useReducedMotion
Browse files Browse the repository at this point in the history
  • Loading branch information
BenHodgsonR2R committed Jul 8, 2024
1 parent ab89f43 commit 5fd17bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shared/src/hooks/useReducedMotion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ export const useReducedMotion = () => {

handleMediaChange(mql)

if(mql.addEventListener) {
if (mql.addEventListener) {
mql.addEventListener('change', handleMediaChange)
} else {
mql.addListener(handleMediaChange)
}

return () => {
if(mql.removeEventListener) {
if (mql.removeEventListener) {
mql.removeEventListener('change', handleMediaChange)
} else {
mql.removeListener(handleMediaChange)
Expand Down

0 comments on commit 5fd17bb

Please sign in to comment.