From 7c4e746fa29c912cafc7f62cacfa42d09c5d4ea3 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Wed, 22 Jul 2020 14:50:14 -0400 Subject: [PATCH] don't confirm close if time displayed is 0 --- app.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index d962ddb..c95477d 100644 --- a/app.js +++ b/app.js @@ -5,7 +5,6 @@ MVP - display how many 5/10min blocks have passed -- don't confirm close if time displayed is 0 - set alarm for after certain times have passed - cleanup - deploy @@ -106,5 +105,7 @@ window.onbeforeunload = function(){ updateSavedPreviousSeconds(); } window.localStorage.setItem('savedPreviousSeconds', savedPreviousSeconds); - return 'Good bye'; + if(savedPreviousSeconds > 0){ + return 'Good bye'; + } }