Skip to content

Commit 25f02d2

Browse files
refactor: remove self
1 parent a6e83e9 commit 25f02d2

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/status-bar-items/mob-status-bar-item.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export class MobStatusBarItem {
4848
}
4949

5050
public startCountDown(minutes: number) {
51-
const self = this;
5251
let seconds = minutes * 60;
5352

5453
if(this._lastSetInterval !== null) {
@@ -57,16 +56,16 @@ export class MobStatusBarItem {
5756
}
5857

5958

60-
const setIntervalId = setInterval(function () {
59+
const setIntervalId = setInterval(() => {
6160
var date = new Date(0);
6261
date.setSeconds(seconds);
6362
var timeString = date.toISOString().substring(11, 19);
6463

65-
self._statusBarItem.text = `$(${self._props.icon}) ${timeString}`;
64+
this._statusBarItem.text = `$(${this._props.icon}) ${timeString}`;
6665

6766
if (--seconds < 0) {
6867
clearInterval(setIntervalId);
69-
self.stopLoading();
68+
this.stopLoading();
7069
}
7170
}, 1000);
7271

0 commit comments

Comments
 (0)