diff --git a/site/gatsby-site/src/components/discover/CsvExport.js b/site/gatsby-site/src/components/discover/CsvExport.js index 437516dbe0..3525f8f443 100644 --- a/site/gatsby-site/src/components/discover/CsvExport.js +++ b/site/gatsby-site/src/components/discover/CsvExport.js @@ -13,10 +13,10 @@ const convertData = (hits) => { 'incident id': hit.incident_id, 'report number': hit.report_number, title: hit.title, - 'date published': format(fromUnixTime(hit.epoch_date_published), 'yyyy-MM-dd'), - 'date submitted': format(fromUnixTime(hit.epoch_date_submitted), 'yyyy-MM-dd'), - 'date modified': format(fromUnixTime(hit.epoch_date_modified), 'yyyy-MM-dd'), - 'date downloaded': format(fromUnixTime(hit.epoch_date_downloaded), 'yyyy-MM-dd'), + 'date published': format(fromUnixTime(hit.epoch_date_published ?? 0), 'yyyy-MM-dd'), + 'date submitted': format(fromUnixTime(hit.epoch_date_submitted ?? 0), 'yyyy-MM-dd'), + 'date modified': format(fromUnixTime(hit.epoch_date_modified ?? 0), 'yyyy-MM-dd'), + 'date downloaded': format(fromUnixTime(hit.epoch_date_downloaded ?? 0), 'yyyy-MM-dd'), url: hit.url, 'source domain': hit.source_domain, language: hit.language,