Skip to content

Commit

Permalink
Media results null check
Browse files Browse the repository at this point in the history
  • Loading branch information
akhilsrivatsa committed Sep 11, 2023
1 parent d31c05c commit bf918a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion frontend/src/data/media-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class MediaService<T extends Media> {
)) as AxiosResponse<MediaResult<DetailFromMediaType<T>[]>>
return {
...res.data,
results: res.data.results.map((item) =>
results: (res.data.results ?? []).map((item) =>
decodeMediaData(item, this.mediaType)
) as DetailFromMediaType<T>[],
}
Expand Down

0 comments on commit bf918a7

Please sign in to comment.