From af8a43b353a834a92ba24adc8afc876b574b30f9 Mon Sep 17 00:00:00 2001 From: CuzImBisonratte Date: Wed, 13 Dec 2023 11:30:29 +0100 Subject: [PATCH] Fix xmark circle not getting replaced correctly --- homework/state.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homework/state.js b/homework/state.js index 1b7aef9..7dd2145 100644 --- a/homework/state.js +++ b/homework/state.js @@ -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")) { @@ -18,4 +19,4 @@ function toggleState(entry_id) { }, success: (data) => { if (data != "success") console.log(data); } }); -} \ No newline at end of file +}