Skip to content

Commit

Permalink
chore: let and const has their own scope
Browse files Browse the repository at this point in the history
  • Loading branch information
tyn1998 committed Aug 13, 2023
1 parent c5e1c87 commit 55d740c
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,11 @@ const RacingBar = (props: RacingBarProps): JSX.Element => {
let startIndex = 0;

for (let i = startIndex; i < months.length - 1; ++i) {
(function (i) {
setTimeout(function () {
updateMonth(months[i + 1]);
if (i + 1 === months.length - 1) {
}
}, (i - startIndex) * updateFrequency);
})(i);
setTimeout(function () {
updateMonth(months[i + 1]);
if (i + 1 === months.length - 1) {
}
}, (i - startIndex) * updateFrequency);
}

// @ts-ignore
Expand Down

0 comments on commit 55d740c

Please sign in to comment.