Skip to content

Commit

Permalink
Fixed call setTimeout from class
Browse files Browse the repository at this point in the history
- Because setTimeout method is the same name of native js function
  • Loading branch information
Tanarat committed Aug 20, 2018
1 parent a388fa2 commit 95122ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class BackgroundTimer {
}

backgroundClockMethod(callback, delay) {
this.backgroundTimer = setTimeout(() => {
this.backgroundTimer = this.setTimeout(() => {
callback();
this.backgroundClockMethod(callback, delay);
},
Expand Down

0 comments on commit 95122ba

Please sign in to comment.