Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
Fix xmark circle not getting replaced correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
CuzImBisonratte authored Dec 13, 2023
1 parent f3cde8e commit af8a43b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homework/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ function toggleState(entry_id) {
// Toggle UI state
const element = document.getElementById("dot-" + entry_id);
if (element.innerHTML.toString().includes("fa-circle")) {
element.innerHTML = element.innerHTML.replace("fa-circle-xmark", "fa-check-circle");
element.innerHTML = element.innerHTML.replace("fa-circle", "fa-check-circle");
var checked = 1;
} else if (element.innerHTML.toString().includes("fa-check-circle")) {
Expand All @@ -18,4 +19,4 @@ function toggleState(entry_id) {
},
success: (data) => { if (data != "success") console.log(data); }
});
}
}

0 comments on commit af8a43b

Please sign in to comment.