Skip to content

Commit

Permalink
Merge pull request #14 from nalbam/main
Browse files Browse the repository at this point in the history
fix eq sign
  • Loading branch information
nalbam authored Oct 10, 2023
2 parents abf5376 + e40af5a commit aaefde2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions public/timer.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class Timer {
if (this.times[2] < 0) {
this.times[2] = 0;
}
if (this.times[0] == this.limit_min) {
if (this.times[0] === this.limit_min) {
this.times[1] = 0;
this.times[2] = 0;
}
Expand Down Expand Up @@ -148,7 +148,7 @@ class Timer {
}

drop() {
if (this.records.length == 0) {
if (this.records.length === 0) {
return;
}

Expand All @@ -163,7 +163,7 @@ class Timer {
}

reject() {
if (this.records.length == 0) {
if (this.records.length === 0) {
return;
}

Expand Down Expand Up @@ -203,7 +203,7 @@ class Timer {
}

findone() {
if (this.records.length == 0) {
if (this.records.length === 0) {
return;
}

Expand Down Expand Up @@ -236,7 +236,7 @@ class Timer {
}

format(times, type = 'long') {
if (type == 'short') {
if (type === 'short') {
return `${this.lpad(times[0], 2)}:${this.lpad(times[1], 2)}`;
}
return `${this.lpad(times[0], 2)}:${this.lpad(times[1], 2)}.${this.lpad(Math.floor(times[2]), 3)}`;
Expand Down

0 comments on commit aaefde2

Please sign in to comment.