Skip to content

Commit edbf22d

Browse files
committed
fix passed start
1 parent 16f652f commit edbf22d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

public/timer.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,9 @@ class Timer {
3333

3434
passed() {
3535
if (!this.running) {
36-
return;
37-
}
38-
if (this.times[0] > 0 || this.times[1] > 2) {
39-
this.record();
40-
this.reset();
4136
this.start();
37+
} else if (this.times[0] > 0 || this.times[1] > 2) {
38+
this.record();
4239
}
4340
}
4441

@@ -144,6 +141,8 @@ class Timer {
144141
li.innerText = this.format(this.times);
145142
this.results.appendChild(li);
146143

144+
this.times = [0, 0, 0];
145+
147146
this.findone();
148147
}
149148

0 commit comments

Comments
 (0)