Browse Source

fix(js): Correct eslint hook rule in globalModal useCallback (#34467)

Evan Purkhiser 2 years ago
parent
commit
0f156ac8ee
1 changed files with 1 additions and 1 deletions
  1. 1 1
      static/app/components/globalModal/index.tsx

+ 1 - 1
static/app/components/globalModal/index.tsx

@@ -108,7 +108,7 @@ function GlobalModal({visible = false, options = {}, children, onClose}: Props)
 
     // GlobalModal onClose prop callback
     onClose?.();
-  }, [options]);
+  }, [options, onClose]);
 
   const handleEscapeClose = useCallback(
     (e: KeyboardEvent) => e.key === 'Escape' && closeModal(),