Fixed weird thing about rebinding 'this'

This commit is contained in:
Danielv123 committed 2018-04-15 21:15:58 +02:00
1 parent 7915b71e10
commit aeeb09a975
1 file changed
+2 -2
+2 -2
View File
@@ -12,8 +12,8 @@ class ResearchSync {
setInterval(() => {
this.pollResearch();
setTimeout(this.doSync, 2000);
}, extras.researchSyncPollInterval || 30000);
setTimeout(this.doSync.bind(this), 2000);
}, extras.researchSyncPollInterval || 5000);
}
pollResearch() {