Bind 'this' for setInterval callback (#1165)

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