1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Bind 'this' for setInterval callback (#1165)

Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Lauri Nevala 2020-10-28 10:59:28 +02:00 committed by GitHub
parent c3bde1ad00
commit bc97f17565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,8 +38,9 @@ export class Tracker extends Util.Singleton {
} }
this.eventHandlers.push(handler) this.eventHandlers.push(handler)
EventBus.appEventBus.addListener(handler) EventBus.appEventBus.addListener(handler)
this.reportInterval = setInterval(() => {
this.reportInterval = setInterval(this.reportData, 60 * 60 * 1000) // report every 1h this.reportData()
}, 60 * 60 * 1000) // report every 1h
} }
stop() { stop() {