Skip to content

Commit 6cc467c

Browse files
committed
Fix use of deprecated property e.path.
1 parent 3e1a822 commit 6cc467c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client/modules/IDE/components/Modal.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ const Modal = ({
1616

1717
const handleOutsideClick = (e) => {
1818
// ignore clicks on the component itself
19-
if (e.path.includes(modalRef.current)) return;
19+
if (modalRef.current?.contains?.(e.target)) return;
2020

2121
onClose();
2222
};
2323

2424
useEffect(() => {
25-
modalRef.current.focus();
25+
modalRef.current?.focus();
2626
document.addEventListener('click', handleOutsideClick, false);
2727

2828
return () => {

0 commit comments

Comments
 (0)