Skip to content

Commit

Permalink
Merge pull request #4174 from owid/fix-algolia-index-bug-updatedAt
Browse files Browse the repository at this point in the history
🐛 fix algolia updatedAt bug
  • Loading branch information
danyx23 authored Nov 15, 2024
2 parents b6a6bce + 5e8c54e commit 1fc853c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion baker/algolia/utils/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ function generateGdocRecords(
views_7d: pageviews[`/${gdoc.slug}`]?.views_7d ?? 0,
excerpt: gdoc.content.excerpt,
date: gdoc.publishedAt!.toISOString(),
modifiedDate: gdoc.updatedAt!.toISOString(),
modifiedDate: (
gdoc.updatedAt ?? gdoc.publishedAt!
).toISOString(),
tags: gdoc.tags?.map((t) => t.name),
documentType: "gdoc" as const,
authors: gdoc.content.authors,
Expand Down

0 comments on commit 1fc853c

Please sign in to comment.