diff --git a/src/backend/metadata/getmeta.ts b/src/backend/metadata/getmeta.ts index 4fd39e7b..d8eca10e 100644 --- a/src/backend/metadata/getmeta.ts +++ b/src/backend/metadata/getmeta.ts @@ -46,7 +46,7 @@ export interface DetailedMeta { export function formatTMDBMetaResult( details: TMDBShowData | TMDBMovieData, type: MWMediaType -): TMDBMediaResult | undefined { +): TMDBMediaResult { let tmdbmeta; if (type === MWMediaType.MOVIE) { tmdbmeta = { @@ -75,6 +75,8 @@ export function formatTMDBMetaResult( ), }; } + + if (!tmdbmeta) throw new Error("unsupported type"); return tmdbmeta; }