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);
tag.element.addEventListener('click', () => {
if (index !== -1) {
activeTags[index].originElement.classList.remove(activeCardClass);
activeTags[index].originElement.querySelector('.modifier-card-image-overlay').innerText = '+';
let idx = activeTags.indexOf(tag);
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();
}
});