From 95122baae9d0d21764f1e4145f98ee7012ba39f5 Mon Sep 17 00:00:00 2001 From: Tanarat Date: Mon, 20 Aug 2018 13:21:50 +0700 Subject: [PATCH] Fixed call setTimeout from class - Because setTimeout method is the same name of native js function --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 94e0441..72152b4 100644 --- a/index.js +++ b/index.js @@ -50,7 +50,7 @@ class BackgroundTimer { } backgroundClockMethod(callback, delay) { - this.backgroundTimer = setTimeout(() => { + this.backgroundTimer = this.setTimeout(() => { callback(); this.backgroundClockMethod(callback, delay); },