diff --git a/webmail/webmail.js b/webmail/webmail.js index 2c63125..cce8a83 100644 --- a/webmail/webmail.js +++ b/webmail/webmail.js @@ -2391,7 +2391,7 @@ const cmdSettings = async () => { let showAddressSecurity; let showHTML; if (!accountSettings) { - window.alert('No account settings fetched yet.'); + throw new Error('No account settings fetched yet.'); } const remove = popup(css('popupSettings', { padding: '1em 1em 2em 1em', minWidth: '30em' }), dom.h1('Settings'), dom.form(async function submit(e) { e.preventDefault(); diff --git a/webmail/webmail.ts b/webmail/webmail.ts index dd8be02..2e5755f 100644 --- a/webmail/webmail.ts +++ b/webmail/webmail.ts @@ -1117,7 +1117,7 @@ const cmdSettings = async () => { let showHTML: HTMLInputElement if (!accountSettings) { - window.alert('No account settings fetched yet.') + throw new Error('No account settings fetched yet.') } const remove = popup(