diff --git a/site/DataPageV2Content.tsx b/site/DataPageV2Content.tsx index db0fce8402f..94c70f3114e 100644 --- a/site/DataPageV2Content.tsx +++ b/site/DataPageV2Content.tsx @@ -102,7 +102,10 @@ export const DataPageV2Content = ({ datapageData.origins[0].dateAccessed ? dayjs(datapageData.origins[0].dateAccessed).format("MMMM D, YYYY") : "" - const urlAccessed = datapageData.origins[0].urlDownload + const urlAccessed = + datapageData.origins && + datapageData.origins.length && + datapageData.origins[0].urlDownload const citationLong = `${citationShort}. ${datapageData.title}. ${originsLong}, ${processedAdapted} by Our World In Data. Retrieved ${dateAccessed} from ${urlAccessed}` const processedAdaptedText = datapageData.owidProcessingLevel === "minor"