userpage: fix email change modal show/hide

pull/298/head
Harvey Tindall 1 year ago
parent 53742e5ec2
commit f5a15905e4
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -450,6 +450,7 @@ const addEditEmail = (add: boolean): void => {
_post("/my/email", {"email": input.value}, (req: XMLHttpRequest) => {
if (req.readyState == 4 && (req.status == 303 || req.status == 200)) {
document.dispatchEvent(new CustomEvent("details-reload"));
window.modals.email.close();
}
}, true, (req: XMLHttpRequest) => {
if (req.readyState == 4 && req.status == 401) {

Loading…
Cancel
Save