fix: return null for anify provider if filtered episodes returning nothing
This commit is contained in:
@@ -73,6 +73,9 @@ export async function getEpisodesFromAnify(
|
||||
})
|
||||
.sort(sortByProperty(sourcePriority, "providerId"));
|
||||
|
||||
if (filteredEpisodesData.length === 0) {
|
||||
return null;
|
||||
}
|
||||
const selectedEpisodeData = filteredEpisodesData[0];
|
||||
return {
|
||||
providerId: selectedEpisodeData.providerId,
|
||||
|
||||
Reference in New Issue
Block a user