Skip to content

Commit

Permalink
fix(PostsGrid): add date type guard
Browse files Browse the repository at this point in the history
  • Loading branch information
sabertazimi committed Aug 6, 2021
1 parent 3c9415b commit 42747cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/PostsGrid/PostCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const PostCard = ({ post }: Props): JSX.Element => {
</Typography.Title>
<Tag className="tag-black">
<div className="text-base font-extrabold">
Posted on {new Date(date).toDateString() || 'Nowadays'}{' '}
Posted on {date ? new Date(date).toDateString() : 'Nowadays'}{' '}
</div>
</Tag>
<Container className="mt-3">
Expand Down

0 comments on commit 42747cf

Please sign in to comment.