Fixed: Sorting queue by episode properties when not all items have an episode

This commit is contained in:
Mark McDowall 2020-03-19 10:11:07 -07:00
parent bc01384cc7
commit eb51a42f60
2 changed files with 3 additions and 2 deletions

View File

@ -77,6 +77,7 @@ export const defaultState = {
{
name: 'episode.title',
label: 'Episode Title',
isSortable: true,
isVisible: true
},
{

View File

@ -151,9 +151,9 @@ namespace Sonarr.Api.V3.Queue
case "episode":
return q => q.Episode;
case "episode.airDateUtc":
return q => q.Episode.AirDateUtc;
return q => q.Episode?.AirDateUtc;
case "episode.title":
return q => q.Episode.Title;
return q => q.Episode?.Title;
case "language":
return q => q.Language;
case "quality":