Skip to content

Commit 38df1f3

Browse files
committed
fix bug with clear history button
1 parent 28379e3 commit 38df1f3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<div class="computation-history-parent">
3939
<h3>history</h3>
4040
<ul class="computation-history" aria-label="Computation History"></ul>
41-
<button class="clear-history-btn" aria-label="Clear History">clear history</button>
41+
<button class="clear-history-btn display" aria-label="Clear History">clear history</button>
4242

4343
</div>
4444

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ function clearHistoryInLocalStorage() {
320320

321321
function togglesClearHistoryButton(element, btn) {
322322
const history = getHistoryFromLocalStorage();
323-
btn.classList.toggle("display", element.childElementCount > 0);
323+
// btn.classList.toggle("display", element.childElementCount > 0);
324+
clearHistoryBtn.classList.toggle("display", element.childElementCount > 0);
324325
}
325326
// functions creations ends

0 commit comments

Comments
 (0)