Skip to content

Commit

Permalink
Bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Soumik committed May 15, 2024
1 parent f9663af commit 8d16c47
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ function createHtml(present,total,subject){
for(let i=0;i<noOfList;i++){
const item = document.createElement('li');
item.className='card';
const data=localStorage.getItem(localStorage.key(i));
const subinfo =JSON.parse(data);
const subinfo =JSON.parse(localStorage.getItem(localStorage.key(i)));
item.innerHTML=createHtml(subinfo.present,subinfo.total,subinfo.subject);
item.id=localStorage.key(i);
const progressbar = item.querySelector('.progress-bar');
Expand All @@ -41,7 +40,7 @@ function createHtml(present,total,subject){
else{
progressbar.style.setProperty('--bgcolor','red');
}
quote.textContent=getquote(data,percentage);
quote.textContent=getquote(subinfo,percentage);
addDeleteListener(item);
addPresentListener(item);
addEditListener(item);
Expand Down

0 comments on commit 8d16c47

Please sign in to comment.