Procházet zdrojové kódy

dashboard: bail out of closeModal() if already closed

Renée Kooi před 6 roky
rodič
revize
10bbebfde1
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      packages/@uppy/dashboard/src/index.js

+ 2 - 1
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
     }