refactor(lint): replace self-equals-this code with arrow functions

This commit is contained in:
Max Baumann
2020-12-24 11:59:24 +01:00
parent cba0fc0a87
commit 0e32042634
3 changed files with 11 additions and 17 deletions

View File

@@ -444,10 +444,9 @@ class SkipNoticeComponent extends React.Component<SkipNoticeProps, SkipNoticeSta
}
getUnskippedModeInfo(index: number, buttonText: string): SkipNoticeState {
const self = this;
const maxCountdownTime = function() {
const sponsorTime = self.segments[index];
const duration = Math.round((sponsorTime.segment[1] - self.contentContainer().v.currentTime) * (1 / self.contentContainer().v.playbackRate));
const maxCountdownTime = () => {
const sponsorTime = this.segments[index];
const duration = Math.round((sponsorTime.segment[1] - this.contentContainer().v.currentTime) * (1 / this.contentContainer().v.playbackRate));
return Math.max(duration, 4);
};