Skip to content

Commit 418b1a7

Browse files
committed
Very minor optimization on timer bar creation.
1 parent db41ada commit 418b1a7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

CookieMonster.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,7 @@ CM.Disp.CreateTimerBar = function() {
552552
colorBar.id = bars[i].id
553553
colorBar.style.display = 'inline-block';
554554
colorBar.style.height = '10px';
555-
if (bars.length == 1 || i == 1) {
555+
if (bars.length - 1 == i) {
556556
colorBar.style.borderTopRightRadius = '10px';
557557
colorBar.style.borderBottomRightRadius = '10px';
558558
}

src/Disp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ CM.Disp.CreateTimerBar = function() {
233233
colorBar.id = bars[i].id
234234
colorBar.style.display = 'inline-block';
235235
colorBar.style.height = '10px';
236-
if (bars.length == 1 || i == 1) {
236+
if (bars.length - 1 == i) {
237237
colorBar.style.borderTopRightRadius = '10px';
238238
colorBar.style.borderBottomRightRadius = '10px';
239239
}

0 commit comments

Comments
 (0)