@syncfusion/ej2-calendars 21.2.8 → 21.2.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1583,10 +1583,10 @@ let CalendarBase = class CalendarBase extends Component {
1583
1583
  * @returns {string}
1584
1584
  */
1585
1585
  currentView() {
1586
- if (this.contentElement.classList.contains(YEAR)) {
1586
+ if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(YEAR)) {
1587
1587
  return 'Year';
1588
1588
  }
1589
- else if (this.contentElement.classList.contains(DECADE)) {
1589
+ else if (!isNullOrUndefined(this.contentElement) && this.contentElement.classList.contains(DECADE)) {
1590
1590
  return 'Decade';
1591
1591
  }
1592
1592
  else {