fix(frontend): filter out undefined backdrop paths for person details page

This commit is contained in:
sct
2020-12-23 17:18:00 +09:00
parent 9f5f920c23
commit 2e0e4d5129

View File

@@ -82,7 +82,7 @@ const PersonDetails: React.FC = () => {
<ImageFader <ImageFader
isDarker isDarker
backgroundImages={[...(sortedCast ?? []), ...(sortedCrew ?? [])] backgroundImages={[...(sortedCast ?? []), ...(sortedCrew ?? [])]
.filter((media) => media.posterPath) .filter((media) => media.backdropPath)
.map( .map(
(media) => (media) =>
`//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${media.backdropPath}` `//image.tmdb.org/t/p/w1920_and_h800_multi_faces/${media.backdropPath}`