diff --git a/webmail/webmail.js b/webmail/webmail.js index 2c63125d2..cce8a83d9 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 dd8be02dd..2e5755fd2 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(