From 28488992066acdc3c670952d912a1102cd92f0a8 Mon Sep 17 00:00:00 2001 From: Qstick Date: Thu, 23 Dec 2021 14:34:48 -0600 Subject: [PATCH] Fixed: Calendar can show incorrect Release Types --- frontend/src/Calendar/Events/CalendarEvent.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/Calendar/Events/CalendarEvent.js b/frontend/src/Calendar/Events/CalendarEvent.js index 254566041..9e6d60ab0 100644 --- a/frontend/src/Calendar/Events/CalendarEvent.js +++ b/frontend/src/Calendar/Events/CalendarEvent.js @@ -43,15 +43,15 @@ class CalendarEvent extends Component { const link = `/movie/${titleSlug}`; const eventType = []; - if (moment(date).isSame(moment(inCinemas), 'day')) { + if (inCinemas && moment(date).isSame(moment(inCinemas), 'day')) { eventType.push('Cinemas'); } - if (moment(date).isSame(moment(physicalRelease), 'day')) { + if (physicalRelease && moment(date).isSame(moment(physicalRelease), 'day')) { eventType.push('Physical'); } - if (moment(date).isSame(moment(digitalRelease), 'day')) { + if (digitalRelease && moment(date).isSame(moment(digitalRelease), 'day')) { eventType.push('Digital'); }