From b7bf18250dabacca7d9908e49421f17d3c061214 Mon Sep 17 00:00:00 2001 From: Larvey Date: Thu, 16 Jun 2022 21:02:30 -0400 Subject: [PATCH] Fix CalendarModule.tsx Fix no content showing when 1 of the same service is down. --- src/components/modules/calendar/CalendarModule.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/components/modules/calendar/CalendarModule.tsx b/src/components/modules/calendar/CalendarModule.tsx index 1d2308586..f7bf5fe3a 100644 --- a/src/components/modules/calendar/CalendarModule.tsx +++ b/src/components/modules/calendar/CalendarModule.tsx @@ -73,6 +73,8 @@ export default function CalendarComponent(props: any) { sonarrServices.map((service) => getMedias(service, 'sonarr').then((res) => { currentSonarrMedias.push(...res.data); + }).catch(() => { + currentSonarrMedias.push([]); }) ) ).then(() => { @@ -83,6 +85,8 @@ export default function CalendarComponent(props: any) { radarrServices.map((service) => getMedias(service, 'radarr').then((res) => { currentRadarrMedias.push(...res.data); + }).catch(() => { + currentRadarrMedias.push([]); }) ) ).then(() => { @@ -93,6 +97,8 @@ export default function CalendarComponent(props: any) { lidarrServices.map((service) => getMedias(service, 'lidarr').then((res) => { currentLidarrMedias.push(...res.data); + }).catch(() => { + currentLidarrMedias.push([]); }) ) ).then(() => { @@ -103,6 +109,8 @@ export default function CalendarComponent(props: any) { readarrServices.map((service) => getMedias(service, 'readarr').then((res) => { currentReadarrMedias.push(...res.data); + }).catch(() => { + currentReadarrMedias.push([]); }) ) ).then(() => {