1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

no undef for tmdbmetaresult

This commit is contained in:
adrifcastr 2023-06-21 12:43:36 +02:00
parent 3f241c2d07
commit 33b67f32b1

View file

@ -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;
}