Gantt not loading when using month scale

I am trying to change scales dynamically. It works fine unless I use month scale. For some reason this subscale does not allow the gantt to load in when using month scale.

gantt.config.subscales = [ {unit:this.dayScale, step:1, date:"%j, %D" } ];

Here is the full function

 changeTimeScale(scale) {
        gantt.config.scale_unit = scale;


        if (scale === this.dayScale) {
            gantt.config.step = 1;
            gantt.config.date_scale = "%d %M";
            gantt.config.subscales = [];
            gantt.config.scale_height = 27;
            gantt.templates.date_scale = null;
        }
        if (scale === this.weekScale) {
            var weekScaleTemplate = function(date){
                var dateToStr = gantt.date.date_to_str("%d %M");
                var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
                return dateToStr(date) + " - " + dateToStr(endDate);
            };


            gantt.config.step = 1;
            gantt.templates.date_scale = weekScaleTemplate;
            gantt.config.subscales = [
                { unit: this.dayScale, step: 1, date: "%D" }
            ];
            gantt.config.scale_height = 50;
        }
        if (scale === this.monthScale) {
            gantt.config.date_scale = "%F, %Y";
//this subscale won't let the gantt chart load. I have to comment this out.            
gantt.config.subscales = [
                {unit:this.dayScale, step:1, date:"%j, %D" }
            ];
            gantt.config.scale_height = 50;
            gantt.templates.date_scale = null;
        }
        if (scale === this.yearScale) {
            gantt.config.step = 1;
            gantt.config.date_scale = "%Y";
            gantt.config.min_column_width = 50;

            gantt.config.scale_height = 90;
            gantt.templates.date_scale = null;


            gantt.config.subscales = [
                { unit: this.monthScale, step: 1, date: "%M" }
            ];
        }
        if (scale === this.quarterScale) {
            
        }

    }

Hello,

Please provide with the demolink, where the problem can be reproduced.

Possibly this snippet will help you, it’s a way how to change scale dynamically by “Ctrl + mouse wheel”.
docs.dhtmlx.com/gantt/snippet/ab61f594

Thanks for the example, let me try this out and get back to you as soon as possible.