fix(ext/settings): guard hostname before remove_blacklist send
This commit is contained in:
@@ -167,7 +167,8 @@ async function renderAutofillSection(content: HTMLElement): Promise<void> {
|
|||||||
|
|
||||||
content.querySelectorAll<HTMLButtonElement>('.remove-bl').forEach((btn) => {
|
content.querySelectorAll<HTMLButtonElement>('.remove-bl').forEach((btn) => {
|
||||||
btn.addEventListener('click', async () => {
|
btn.addEventListener('click', async () => {
|
||||||
const host = btn.dataset.hostname!;
|
const host = btn.dataset.hostname;
|
||||||
|
if (!host) return;
|
||||||
await sendMessage({ type: 'remove_blacklist', hostname: host });
|
await sendMessage({ type: 'remove_blacklist', hostname: host });
|
||||||
renderAutofillSection(content);
|
renderAutofillSection(content);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user