Fixed: Sorting series without a Previous Airing

Closes #4809
pull/4812/head
Mark McDowall 3 years ago
parent b869ebeac2
commit 52d8f87c66

@ -210,6 +210,20 @@ export const defaultState = {
return Number.MAX_VALUE;
},
previousAiring: function(item, direction) {
const previousAiring = item.previousAiring;
if (previousAiring) {
return moment(previousAiring).unix();
}
if (direction === sortDirections.DESCENDING) {
return -Number.MAX_VALUE;
}
return Number.MAX_VALUE;
},
episodeProgress: function(item) {
const { statistics = {} } = item;

Loading…
Cancel
Save