From 5659dcf4b94a45cfd630b2624ce78c5f53ae64d0 Mon Sep 17 00:00:00 2001 From: erinz2020 Date: Wed, 29 Nov 2023 06:33:55 +0000 Subject: [PATCH] bug fix 2 --- src/components/fields/edit/LocationIdEditor.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/fields/edit/LocationIdEditor.jsx b/src/components/fields/edit/LocationIdEditor.jsx index f09199f0..e102665b 100644 --- a/src/components/fields/edit/LocationIdEditor.jsx +++ b/src/components/fields/edit/LocationIdEditor.jsx @@ -73,9 +73,9 @@ export default function LocationIdEditor(props) { const select = (event) => { const dropdown = document.querySelector('#treeViewDemo'); - if(event.target.classList.contains('MuiSvgIcon-root') || + if(event.target?.classList?.contains('MuiSvgIcon-root') || dropdown.contains(event.target) || - event.target.parentNode.classList.contains('MuiSvgIcon-root') + event.target?.parentNode?.classList?.contains('MuiSvgIcon-root') ) { setModalOpen(true); }else {