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'); }