webmail: if we don't have loaded account settings yet, abort loading the popup after showing an error that the settings aren't available yet

missing returning/throwing error.

based on screenshot with unhandled js error in issue #218 by mgkirs
This commit is contained in:
Mechiel Lukkien 2024-10-10 14:29:52 +02:00
parent 0fbf24160c
commit 04305722a7
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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(