Skip to content

Commit

Permalink
[FIX] Add more null checks to Project All Documents page (#3212)
Browse files Browse the repository at this point in the history
add null checks
  • Loading branch information
taraepp authored Aug 12, 2024
1 parent 275c6ba commit f872a53
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,10 @@ const ProjectDocumentsTab: FC<ProjectDocumentsTabProps> = ({ project }) => {
);
}, []);

const authsWithDocs = project.project_summary.authorizations.filter(
(auth) => auth.amendment_documents.length > 0
);
const authsWithDocs =
project?.project_summary?.authorizations?.filter(
(auth) => auth.amendment_documents.length > 0
) ?? [];
const headerHeight = isCore ? 121 : 123;
const tabNavHeight = isCore ? 60 : 49;
const topOffset = headerHeight + tabNavHeight;
Expand All @@ -82,7 +83,7 @@ const ProjectDocumentsTab: FC<ProjectDocumentsTabProps> = ({ project }) => {
};

const projectSummaryDocs =
project?.project_summary?.documents.map(
project?.project_summary?.documents?.map(
(d) =>
new MineDocument({
...d,
Expand Down

0 comments on commit f872a53

Please sign in to comment.