Fixed midnight reset

This commit is contained in:
2021-11-13 00:06:33 +03:00
parent 9f07a0897f
commit 9c881bd430
3 changed files with 14 additions and 10 deletions

View File

@@ -28,7 +28,8 @@ export default {
beforeMount() {
const lastMidnight = new Date();
lastMidnight.setHours(0, 0, 0, 0);
if (this.midnightReset && this.lastReset < lastMidnight) {
const lastReset = new Date(this.lastReset);
if (this.midnightReset && lastReset < lastMidnight) {
this.resetTasks();
}
},