Skip to content

Commit

Permalink
fix the day in the local storage
Browse files Browse the repository at this point in the history
  • Loading branch information
najmiter authored Feb 11, 2024
1 parent 9573d97 commit d15a2ca
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit d15a2ca

Please sign in to comment.