Skip to content

Commit

Permalink
Merge pull request #11 from WillianRod/bugfix/fix-release-date
Browse files Browse the repository at this point in the history
Fix invalid date at render release date
  • Loading branch information
willianrod committed Oct 31, 2020
2 parents 498f371 + bdee16b commit bbe42a2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/components/MediaMovie.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,11 @@ const MediaMovie = ({ movie }) => {
{' '}
-
{' '}
{moment(movie.release_date).format('MM/DD/YYYY')}
{
movie.release_date
? moment(movie.release_date).format('MM/DD/YYYY')
: null
}
</Text>
</View>
</View>
Expand Down
6 changes: 5 additions & 1 deletion src/components/MediaTV.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ const MediaTV = ({ tvShow }) => {
{' '}
-
{' '}
{moment(tvShow.first_air_date).format('MM/DD/YYYY')}
{
tvShow.first_air_date
? moment(tvShow.first_air_date).format('MM/DD/YYYY')
: null
}
</Text>
</View>
</View>
Expand Down

0 comments on commit bbe42a2

Please sign in to comment.