parameter missing in onOptionsLoad?

Hi.
Upgrading to 2.3 I get an error (undefined object) when loading the page.
It occurs, when the onOptionsLoad-Event (as defined in dhtmlxscheduler_timeline.js) is executed from createUnitsView();
Which in turn is called from the init-function as this:

		scheduler.createUnitsView({
			name:"unit",
			property:"section_id",
			list:scheduler.sections2
		});

I understand that the parameter of forementioned event is new in 2.3 (befor “M” was a global variable!?).
Maybe the problem is, that (at least) two function are assigned to onOptionsLoad, the other one doesn’t need a parameter?

It may well be, that the error lies with my setup, I very recently inherited this code (from another developer) and I am not very familiar with it yet. So please point me in some helpful direction if the error lies with me.

Greetings, Gerrit

PS:
Adding a parametercheck to the onOptionload seems to fix it, but I fear other consequences. :slight_smile:

scheduler.attachEvent("onOptionsLoad", function (M) {
   if(!M) return; // ----- this was inserted to prevent the mentioned error -----
    M.order = {};
    for (var L = 0; L < M.y_unit.length; L++) {
        M.order[M.y_unit[L].key] = L
    }
    if (scheduler._date) {
        scheduler.setCurrentView(scheduler._date, scheduler._mode)
    }
});

Regression confirmed, fix will be available later today, or on Monday ( I will update the post, when it will be available )

Regression was confirmed and fixed.

Please grab the updated package from the
dhtmlx.com/docs/products/dhtmlxS … eduler.zip

It works.
Thank you!