fixed remove from exceptions button

This commit is contained in:
2026-02-09 16:13:28 +03:00
parent 46976fc696
commit 8a44ad8022

View File

@@ -957,9 +957,9 @@ export class PopupController {
}); });
document.getElementById('exceptionsList')?.addEventListener('click', async (e) => { document.getElementById('exceptionsList')?.addEventListener('click', async (e) => {
const target = e.target as HTMLElement; const button = (e.target as HTMLElement).closest('.exception-remove');
if (target.classList.contains('exception-remove')) { if (button) {
const domain = target.dataset.domain!; const domain = (button as HTMLElement).dataset.domain!;
this.exceptionsList = this.exceptionsList.filter(d => d !== domain); this.exceptionsList = this.exceptionsList.filter(d => d !== domain);
this.updateExceptionButton(); this.updateExceptionButton();
this.renderExceptions(); this.renderExceptions();