Merge pull request #11668 from nixocio/ui_issue_11582

Fix typerror cannot read property of null
This commit is contained in:
Alex Corey 2022-02-02 14:46:04 -05:00 committed by GitHub
commit d977aff8cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}
};