From 10bbebfde18b58144f594da2e409c4c1ea9623bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Mon, 28 Jan 2019 16:02:49 +0100 Subject: [PATCH] dashboard: bail out of closeModal() if already closed --- packages/@uppy/dashboard/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/@uppy/dashboard/src/index.js b/packages/@uppy/dashboard/src/index.js index 5d4cdedc6..7e316a76d 100644 --- a/packages/@uppy/dashboard/src/index.js +++ b/packages/@uppy/dashboard/src/index.js @@ -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 }