fix create page tag duplicate

This commit is contained in:
Kara Hoagland 2022-11-30 16:35:45 -08:00
parent 9bc5b5624b
commit 23bf3a2c84

View File

@ -97,10 +97,10 @@ function initFormHandler() {
let tagLabel = document.createElement("label");
tagLabel.innerHTML = tagField.value;
tagLabel.setAttribute("class","tag");
tagSet.add(tagField.value.toLowerCase());
tagSet.add(tagSetVal);
tagLabel.addEventListener("click",()=> {
tagContainer.removeChild(tagLabel);
tagSet.delete(tagField.value.toLowerCase());
tagSet.delete(tagSetVal);
});
tagContainer.append(tagLabel);