Revert changes to refreshTagsList

This commit is contained in:
Haka 2022-09-23 15:35:05 +03:00
parent 0efa4ffb23
commit 4264c2e266

View File

@ -1424,11 +1424,13 @@ function refreshTagsList() {
editorModifierTagsList.appendChild(tag.element); editorModifierTagsList.appendChild(tag.element);
tag.element.addEventListener('click', () => { tag.element.addEventListener('click', () => {
if (index !== -1) { let idx = activeTags.indexOf(tag);
activeTags[index].originElement.classList.remove(activeCardClass);
activeTags[index].originElement.querySelector('.modifier-card-image-overlay').innerText = '+';
activeTags.splice(index, 1); if (idx !== -1) {
activeTags[idx].originElement.classList.remove(activeCardClass);
activeTags[idx].originElement.querySelector('.modifier-card-overlay').innerText = '+';
activeTags.splice(idx, 1);
refreshTagsList(); refreshTagsList();
} }
}); });