use .bind instead of self=this

This commit is contained in:
jesopo 2022-03-30 13:45:47 +00:00
parent 3320fee9a0
commit f218a66c2d

View File

@ -37,9 +37,8 @@ export class ReportPoll {
) { }
private schedulePoll() {
const self = this;
this.timeout = setTimeout(
function() { self.getAbuseReports() },
this.getAbuseReports.bind(this),
60_000 // a minute in milliseconds
);
}