JS Error When Deleting Single Recurrance of an Event (Fixed)

Hi,
I’m implementing the dhtmlxscheduler frontend using JSON to load event data from a custom backend, including recurring events. However, I’m running into a javascript error whenever I delete a single recurrence of a recurring event:

scheduler.date["transpose_" + G.rec_pattern] is not a function

After digging through the code a bit, I’ve determined that the events scheduler is creating the appropriate delete event. The event is created normally (as far as I can tell), with the rec_pattern and rec_type of none. However some point after the event has been added to the internal _events array, scheduler.getRecDates() runs and attempts to reference the added event. This leads to the scheduler attempting to call date.transpose_none which throws the previously-mentioned error. What could be causing this?

Here is the JSON used to load the original recurring event:

{"start_date":"2010-11-01 12:00:00", "end_date":"2010-12-01 18:00:00", "title":"Recurring", "text":"Recurring", "description":"", "id":"1288813532652", "rec_type":"week_1___3#4", "event_length":"900"}

Here are the equivalent properties in the event created by the scheduler before the error occurs:

description: " " end_date: Wed Nov 17 2010 18:00:00 GMT -0500 event_length: 1289970000 event_pid: 1288813532652 id: 1288886573515 rec_type: none start_date: Wed Nov 17 2010 12:00:00 GMT -0500 text: "recurring" title: "recurring"

Any idea what could be causing this? Thanks in advance for your help!

I was actually able to figure this out on my own. I had attached a function that would run on the eventChange scheduler event but didn’t make the connection that this function would also run when an event is deleted as well. The function calls getRecDates() and only checks to see if the rec_type field is blank, but not “none.” I have corrected this.