Skip to content

Commit

Permalink
added check for a null dateLastPurchased value
Browse files Browse the repository at this point in the history
  • Loading branch information
sar-mko committed Sep 24, 2024
1 parent 4f5c607 commit b81c9f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ListItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ export function ListItem({ item }) {
<ul>
<li>
Last Purchase:
{dateLastPurchased?.toDate().toDateString()}
{dateLastPurchased
? dateLastPurchased.toDate().toDateString()
: 'N/A'}
</li>
<li>
Next Purchase:
Expand Down

0 comments on commit b81c9f9

Please sign in to comment.