1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #2499 from thornbill/fix-alert-promises

Fix dialog helper not resolving
This commit is contained in:
dkanada 2021-03-15 07:22:44 +09:00 committed by GitHub
commit a3dc471484
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -106,6 +106,15 @@ import '../../assets/css/scrollstyles.css';
tryRemoveElement(dlg);
}
}
//resolve();
// if we just called history.back(), then use a timeout to allow the history events to fire first
setTimeout(() => {
resolve({
element: dlg,
closedByBack: self.closedByBack
});
}, 1);
}
dlg.addEventListener('close', onDialogClosed);