dashboard: bail out of closeModal() if already closed

This commit is contained in:
Renée Kooi 2019-01-28 16:02:49 +01:00
parent 6b7ef55180
commit 10bbebfde1
No known key found for this signature in database
GPG key ID: 8CDD5F0BC448F040

View file

@ -341,7 +341,8 @@ module.exports = class Dashboard extends Plugin {
manualClose = true // Whether the modal is being closed by the user (`true`) or by other means (e.g. browser back button)
} = opts
if (this.getPluginState().isClosing) {
const { isHidden, isClosing } = this.getPluginState()
if (isHidden || isClosing) {
// short-circuit if animation is ongoing
return
}