Scheduler - Reccuring Events - Infinite Loop

I want to merge my own project, which use dhtmlxScheduler, with dhtmlscheduler_reccuring.js .

I normally join *.js and *.css files, as it is written in manual for recurring events, next I modified my database, then I started my project. Here begins…

I got message from my Google Chrome Console:

What is in 3004 line? I checked it. There is defined scheduler.get_visible_events() function. This function is running frequently, and finish my stack for current tab.

I was suprised, when I look to code, because, what I saw there? (I’M NOD MODIFIED THIS FILE - EVER):

scheduler.get_visible_events_rec = scheduler.get_visible_events;
scheduler.get_visible_events = function() {
    for (var a = 0; a < this._rec_temp.length; a++) delete this._events[this._rec_temp[a].id];
    this._rec_temp = [];
    for (var b = this.get_visible_events_rec(),c = [],a = 0; a < b.length; a++) b[a].rec_type ? b[a].rec_pattern != "none" && this.repeat_date(b[a], c) : c.push(b[a]);
    return c

Or I’m not much experienced wed developer, or I’m just stupid, but it has no rights to get work correctly.

scheduler.get_visible_events launching scheduler.get_visible_events_rec, which is reference to scheduler.get_visible_events, so, we have infinite loop. Problem goes away, when I’ll turn off recurring events, but I want to use this. What is wrong? What could be?

Ok, it work.
This case was, cause I used dhtmlScheduler 3.0 builder, which merge all additional libraries with one file, so I starte recurring events from 2 places.

Two things:
if someone despite everything is ok - can explain me, how function above work?
next, does dhtmlx team can’t prepare some function which will check if I have already some additional plugins loaded or not?

The logic may be a bit confusing because of not very good naming and code optimization from the compressing tool.

Above code do the next

a) save old get_visible_events ( in get_visible_events_rec )
b) set new function in place of get_visible_events_rec which is aware of recurring events
c) call old get_visible_events when necessary