diff --git a/awx/ui/src/components/AddDropDownButton/AddDropDownButton.js b/awx/ui/src/components/AddDropDownButton/AddDropDownButton.js index b240450bb7..18a0eb8326 100644 --- a/awx/ui/src/components/AddDropDownButton/AddDropDownButton.js +++ b/awx/ui/src/components/AddDropDownButton/AddDropDownButton.js @@ -12,7 +12,7 @@ function AddDropDownButton({ dropdownItems, ouiaId }) { useEffect(() => { const toggle = (e) => { - if (!isKebabified && (!element || !element.current.contains(e.target))) { + if (!isKebabified && (!element || !element.current?.contains(e.target))) { setIsOpen(false); } };