mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-27 09:31:50 +01:00
no undef for tmdbmetaresult
This commit is contained in:
parent
3f241c2d07
commit
33b67f32b1
@ -46,7 +46,7 @@ export interface DetailedMeta {
|
|||||||
export function formatTMDBMetaResult(
|
export function formatTMDBMetaResult(
|
||||||
details: TMDBShowData | TMDBMovieData,
|
details: TMDBShowData | TMDBMovieData,
|
||||||
type: MWMediaType
|
type: MWMediaType
|
||||||
): TMDBMediaResult | undefined {
|
): TMDBMediaResult {
|
||||||
let tmdbmeta;
|
let tmdbmeta;
|
||||||
if (type === MWMediaType.MOVIE) {
|
if (type === MWMediaType.MOVIE) {
|
||||||
tmdbmeta = {
|
tmdbmeta = {
|
||||||
@ -75,6 +75,8 @@ export function formatTMDBMetaResult(
|
|||||||
),
|
),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!tmdbmeta) throw new Error("unsupported type");
|
||||||
return tmdbmeta;
|
return tmdbmeta;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user