Skip to content

Commit

Permalink
fix: only show date modified if Gatsby sees it as valid
Browse files Browse the repository at this point in the history
  • Loading branch information
zstix committed Aug 14, 2020
1 parent a1c84f8 commit fe14bb7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/RelatedContentModules/PageUpdated.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const PageUpdated = ({ page }) => {
fields: { gitAuthorTime },
} = page;

// If there is no date available, do not render the component
if (gitAuthorTime === 'Invalid date') return null;

return (
<Section
css={css`
Expand Down

0 comments on commit fe14bb7

Please sign in to comment.