diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js index 049c6a12d..d473b60d5 100644 --- a/front/core/components/calendar/index.js +++ b/front/core/components/calendar/index.js @@ -204,7 +204,7 @@ export default class Calendar extends Component { return event.dated >= dated && event.dated <= dated; }); - const params = {dated: dated, events: events, style: {}}; + const params = {dated: dated, events: events /**/, style: {}}; const isSaturday = dated.getDay() === 6; const isSunday = dated.getDay() === 0; const isCurrentMonth = dated.getMonth() === this.currentMonth.getMonth(); @@ -290,13 +290,15 @@ export default class Calendar extends Component { renderStyle(style) { const normalizedStyle = {}; - const properties = Object.keys(style); - properties.forEach(attribute => { - const attrName = attribute.split(/(?=[A-Z])/). - join('-').toLowerCase(); + if (style) { + const properties = Object.keys(style); + properties.forEach(attribute => { + const attrName = attribute.split(/(?=[A-Z])/). + join('-').toLowerCase(); - normalizedStyle[attrName] = style[attribute]; - }); + normalizedStyle[attrName] = style[attribute]; + }); + } return normalizedStyle; }