Skip to content

Commit

Permalink
fix: Check non-existing dates (#1504)
Browse files Browse the repository at this point in the history
* Check non-existing dates

* Update to have empty string instead.
  • Loading branch information
louisachu committed May 2, 2023
1 parent 7d87d97 commit 1fb264a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-theme-aio/src/components/MDXFilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,9 +380,9 @@ export default ({ children, pageContext, query }) => {
contributors={contributors}
externalContributors={pageContext?.frontmatter?.contributors}
date={
contributors[0]
contributors[0]?.date
? new Date(contributors[0].date).toLocaleDateString()
: new Date().toLocaleDateString()
: ""
}
/>
</div>
Expand Down

0 comments on commit 1fb264a

Please sign in to comment.