Skip to content

Commit

Permalink
Fix a bug that caused the 'started at' time to jump forward on page r…
Browse files Browse the repository at this point in the history
…efresh
  • Loading branch information
loehnertz committed Jul 23, 2024
1 parent 2c9d424 commit 4d86b01
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/views/BrewView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ export default defineComponent({
*/
infusionCount(newCount) {
if (newCount === 2) {
// If started somewhat recently, the initial time should be the same as the first infusion
const initialTimeMillis = this.initialTime * 1000
this.startedAt = Date.now() - initialTimeMillis
if (Date.now() - this.startedAt < initialTimeMillis * 2) {
this.startedAt = Date.now() - initialTimeMillis
}
}
},
},
Expand Down

0 comments on commit 4d86b01

Please sign in to comment.