Skip to content

Commit

Permalink
added handling for null edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjeevLakhwani committed Aug 19, 2024
1 parent a58619c commit 1194e93
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/js/components/ChooseProjectModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ChooseProjectModal = ({ isModalOpen, setIsModalOpen }: ChooseProjectModalP
const t = useTranslationCustom();
const location = useLocation();
const { projects, selectedScope } = useAppSelector((state) => state.metadata);
const [selectedProject, setSelectedProject] = useState(selectedScope.project ?? projects[0].identifier);
const [selectedProject, setSelectedProject] = useState(selectedScope.project ?? projects[0]?.identifier ?? null);

const baseURL = '/' + location.pathname.split('/')[1];

Expand Down

0 comments on commit 1194e93

Please sign in to comment.