Use anonymous function in setInterval

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala committed 2020-10-28 10:43:36 +02:00
1 parent 141edfb701
commit 3b1f785738
1 file changed
+3 -1
+3 -1
View File
@@ -38,7 +38,9 @@ export class Tracker extends Util.Singleton {
}
this.eventHandlers.push(handler)
EventBus.appEventBus.addListener(handler)
this.reportInterval = setInterval(this.reportData.bind(this), 60 * 60 * 1000) // report every 1h
this.reportInterval = setInterval(() => {
this.reportData()
}, 60 * 60 * 1000) // report every 1h
}
stop() {