From 0fd0d5be7dcd3cde72c2609db7dd25787dc6c97d Mon Sep 17 00:00:00 2001 From: mahuntington Date: Mon, 21 Oct 2024 22:39:50 -0400 Subject: [PATCH] Update 'src/components/timer.vue' --- src/components/timer.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/timer.vue b/src/components/timer.vue index 12e9590..da75fd6 100644 --- a/src/components/timer.vue +++ b/src/components/timer.vue @@ -171,7 +171,11 @@ }, mounted() { this.practice_category_id = this.currentWorkingCategory.id - this.totalSeconds = parseInt(window.localStorage.getItem('lastTotalSeconds')) + if(window.localStorage.getItem('lastTotalSeconds')){ + this.totalSeconds = parseInt(window.localStorage.getItem('lastTotalSeconds')) + } else { + this.totalSeconds = 0 + } this.setManualTime(this.totalSeconds) this.savedPreviousSeconds = this.totalSeconds window.onbeforeunload = this.confirmClose