Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
getConfig(config: IMonthCalendarConfig): IMonthCalendarConfig {
this.DEFAULT_CONFIG = (config.calendarSystem !== ECalendarSystem.gregorian) ?
this.JALALI_DEFAULT_CONFIG : this.GREGORIAN_DEFAULT_CONFIG;
moment.locale(this.DEFAULT_CONFIG.locale);
return {...this.DEFAULT_CONFIG, ...this.utilsService.clearUndefined(config)};
}