Skip to content
This repository has been archived by the owner on Jul 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request #33 from tuhinpal/stage
Browse files Browse the repository at this point in the history
Fix bugs
  • Loading branch information
tuhinpal authored Nov 27, 2023
2 parents 99ec6d7 + a752886 commit a016f5e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/helpers/getTitle.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default async function getTitle(id) {
review_api_path: `/reviews/${id}`,
imdb: `https://www.imdb.com/title/${id}`,
contentType: props.aboveTheFoldData.titleType.id,
contentRating: props.aboveTheFoldData.certificate.rating,
contentRating: props.aboveTheFoldData?.certificate?.rating ?? "N/A",
isSeries: props.aboveTheFoldData.titleType.isSeries,
productionStatus:
props.aboveTheFoldData.productionStatus.currentProductionStage.id,
Expand All @@ -52,12 +52,12 @@ export default async function getTitle(id) {
"",
runtimeSeconds: props.aboveTheFoldData.runtime?.seconds ?? 0,
rating: {
count: props.aboveTheFoldData.ratingsSummary.voteCount,
star: props.aboveTheFoldData.ratingsSummary.aggregateRating,
count: props.aboveTheFoldData.ratingsSummary?.voteCount ?? 0,
star: props.aboveTheFoldData.ratingsSummary?.aggregateRating ?? 0,
},
award: {
wins: props.mainColumnData.wins.total,
nominations: props.mainColumnData.nominations.total,
wins: props.mainColumnData.wins?.total ?? 0,
nominations: props.mainColumnData.nominations?.total ?? 0,
},
genre: props.aboveTheFoldData.genres.genres.map((e) => e.id),
releaseDetailed: {
Expand Down

0 comments on commit a016f5e

Please sign in to comment.