(Issue) recurring.js ev.rec_type on non-object

Hello,

In dhtmlxscheduler_recurring.js, in scheduler.updateEvent() overloading (approx. line 544), a test on ev existence misses.

There is :

scheduler.updateEvent = function(id) { var ev = scheduler.getEvent(id); if(ev.rec_type){ //rec_type can be changed without the lightbox, // make sure rec_pattern updated as well ev.rec_pattern = (ev.rec_type || "").split("#")[0]; } if (ev && ev.rec_type && id.toString().indexOf('#') === -1) { scheduler.update_view(); }[..]

Should be (as it is done on other conditions of the same method) :

scheduler.updateEvent = function(id) { var ev = scheduler.getEvent(id); if(ev && ev.rec_type){ [..]

Currently, this method throw a JS error (ev is undefined) in some cases.

Hello,
probably it is related to the bug of dhtmlxScheduler v4.0, please try the patch from this topic

viewtopic.php?f=6&t=34486&p=110609#p110609

Thanks, effectively that works as waited.

PS : sorry for the duplicated post.