diff --git a/seasoned_api/src/tmdb/convertTmdbToSeasoned.js b/seasoned_api/src/tmdb/convertTmdbToSeasoned.js index 7379610..79f2d00 100644 --- a/seasoned_api/src/tmdb/convertTmdbToSeasoned.js +++ b/seasoned_api/src/tmdb/convertTmdbToSeasoned.js @@ -2,7 +2,10 @@ const Movie = require('src/media_classes/movie'); const Show = require('src/media_classes/show'); function convertTmdbToSeasoned(tmdbObject, strictType=undefined) { - const mediaType = strictType || tmdbObject.media_type; + if (strictType === undefined) + var mediaType = tmdbObject.media_type; + else + var mediaType = strictType; // There are many diff types of content, we only want to look at movies and tv shows if (mediaType === 'movie') { @@ -47,4 +50,5 @@ function convertTmdbToSeasoned(tmdbObject, strictType=undefined) { } } -module.exports = convertTmdbToSeasoned; \ No newline at end of file +module.exports = convertTmdbToSeasoned; +