added option chain for handle error
This commit is contained in:
parent
794429821b
commit
daa1a29e8a
@ -13,7 +13,7 @@ const { projectNames = [], loading: projectLoading } = useProjectName();
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!selectedProject) {
|
if (!selectedProject) {
|
||||||
dispatch(setProjectId(projectNames[0].id));
|
dispatch(setProjectId(projectNames[0]?.id));
|
||||||
}
|
}
|
||||||
}, [projectNames, selectedProject?.id, dispatch]);
|
}, [projectNames, selectedProject?.id, dispatch]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user