Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Commit

Permalink
fix: builds!
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerBarnes committed Oct 30, 2019
1 parent 307e726 commit ff1b147
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/context/InternalProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@ class InternalProvider extends Component {
updateContext: obj => this.setState(obj)
};

prefersReducedMotion.addEventListener('change', () => {
this.setState({ disableAnimation: prefersReducedMotion.matches });
});
if (typeof window !== `undefined`) {
prefersReducedMotion.addEventListener("change", () => {
this.setState({ disableAnimation: prefersReducedMotion.matches })
})
}
}

componentDidMount() {
Expand Down

0 comments on commit ff1b147

Please sign in to comment.