delete tag bug

This commit is contained in:
Kara Hoagland
2022-11-29 14:16:17 -08:00
parent 847e8a1aa1
commit 1cdaa63935
3 changed files with 16 additions and 13 deletions

View File

@@ -92,7 +92,8 @@ function initFormHandler() {
tagAddBtn.addEventListener("click", ()=> {
let tagField = document.getElementById("tag-form");
if (tagField.value.length > 0) {
if (!tagSet.has(tagField.value.toLowerCase())){
let tagSetVal = tagField.value.toLowerCase();
if (!tagSet.has(tagSetVal)){
let tagLabel = document.createElement("label");
tagLabel.innerHTML = tagField.value;
tagLabel.setAttribute("class","tag");