Skip to content

Commit

Permalink
fix: handle temporal coverage undefined properties
Browse files Browse the repository at this point in the history
  • Loading branch information
candicecz committed Jan 24, 2024
1 parent 9fa4d9e commit 86e08d6
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ const SpatiotemporalCoverage: React.FC<SpatiotemporalCoverageProps> = ({
Temporal Coverage
</Text>
{/* Start */}
{temporalCoverage.temporalInterval.startDate && (
{temporalCoverage?.name && <Text>{temporalCoverage.name}</Text>}
{temporalCoverage?.temporalInterval?.startDate && (
<Text>
<Text as='span' fontWeight='medium'>
Start Date:
Expand All @@ -222,7 +223,7 @@ const SpatiotemporalCoverage: React.FC<SpatiotemporalCoverageProps> = ({
</Text>
)}
{/* End */}
{temporalCoverage.temporalInterval.endDate && (
{temporalCoverage?.temporalInterval?.endDate && (
<Text>
<Text as='span' fontWeight='medium'>
End Date:
Expand All @@ -231,7 +232,7 @@ const SpatiotemporalCoverage: React.FC<SpatiotemporalCoverageProps> = ({
</Text>
)}
{/* Duration */}
{temporalCoverage.temporalInterval.duration && (
{temporalCoverage?.temporalInterval?.duration && (
<Text>
<Text as='span' fontWeight='medium'>
Duration:
Expand Down

0 comments on commit 86e08d6

Please sign in to comment.