Skip to content

Commit

Permalink
webmail: if we don't have loaded account settings yet, abort loading …
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
mjl- committed Oct 10, 2024
1 parent 0fbf241 commit 0430572
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion webmail/webmail.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion webmail/webmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 0430572

Please sign in to comment.