added option chain for handle error

This commit is contained in:
pramod mahajan 2025-09-16 18:11:47 +05:30
parent 794429821b
commit daa1a29e8a

View File

@ -13,7 +13,7 @@ const { projectNames = [], loading: projectLoading } = useProjectName();
useEffect(() => {
if (!selectedProject) {
dispatch(setProjectId(projectNames[0].id));
dispatch(setProjectId(projectNames[0]?.id));
}
}, [projectNames, selectedProject?.id, dispatch]);