From d15a2ca69f6790f3362bf627d2ba249c4bab6b4f Mon Sep 17 00:00:00 2001 From: Najam <85332859+najmiter@users.noreply.github.com> Date: Sun, 11 Feb 2024 11:06:02 +0500 Subject: [PATCH] fix the day in the local storage --- main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index 7fa0678..bec9bc0 100644 --- a/main.js +++ b/main.js @@ -5,13 +5,12 @@ fetch("tasbih.json") const day = today.getDay(); const day_name = tasbihaat[day].day; - const old = - localStorage.getItem("today") ?? - localStorage.setItem("today", day_name); + const old = localStorage.getItem("today"); + localStorage.setItem("today", day_name); let counter_count = old && old !== day_name ? 0 : +localStorage.getItem("counter") ?? 0; - + const target = 100; const qalma = document.getElementById("qalma");