Skip to content

Commit

Permalink
fix(project): make PlaylistItem.tags optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Jun 22, 2021
1 parent 6a1404c commit 4e16f59
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/screens/Movie/Movie.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const Movie = ({
<meta property="og:video:type" content="text/html" />
<meta property="og:video:width" content="1280" />
<meta property="og:video:height" content="720" />
{item.tags.split(',').map((tag) => (
{item.tags?.split(',').map((tag) => (
<meta property="og:video:tag" content={tag} key={tag} />
))}
{item ? <script type="application/ld+json">{generateMovieJSONLD(item)}</script> : null}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/Series/Series.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const Series = ({
<meta property="og:video:type" content="text/html" />
<meta property="og:video:width" content="1280" />
<meta property="og:video:height" content="720" />
{item.tags.split(',').map((tag) => (
{item.tags?.split(',').map((tag) => (
<meta property="og:video:tag" content={tag} key={tag} />
))}
{seriesPlaylist && item ? <script type="application/ld+json">{generateEpisodeJSONLD(seriesPlaylist, item)}</script> : null}
Expand Down
2 changes: 1 addition & 1 deletion types/playlist.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export type PlaylistItem = {
seriesId?: string;
episodeNumber?: string;
seasonNumber?: string;
tags: string;
tags?: string;
trailerId?: string;
title: string;
tracks: Track[];
Expand Down

0 comments on commit 4e16f59

Please sign in to comment.