Skip to content

Commit

Permalink
fix: remove redundant isClient checks
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich committed Apr 20, 2018
1 parent f567d58 commit 38c2fc9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AfterDraf/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const createAfterDraf = (times = 1) => {
}

componentDidMount () {
if (isClient && cnt < times) {
if (cnt < times) {
const RAF = requestAnimationFrame;

this.frame = RAF(() => {
Expand All @@ -38,7 +38,7 @@ export const createAfterDraf = (times = 1) => {
}

componentWillUnmount () {
if (isClient && cnt < times) {
if (cnt < times) {
cancelAnimationFrame(this.frame);
}
}
Expand Down

0 comments on commit 38c2fc9

Please sign in to comment.