getMenuItem is not a function.

I am using a menu, some times when I click on a menu Item. I get javascript exception “undefined is not a function”.

  1. Why do I get this?
  2. Do I need to update to a newer version of webix?

I get this error 5 out of 10 times. I need this function very badly in my program. Please help me!!!

This is my code:

view: "menu",
                                    id:"menu123",
                                    css:"header_left",
                                    data: menuData,
                                    borderless: true,
                                    $css: "globalMenu",
                                    openAction: "click",
                                    on: {
                                        onMenuItemClick: function(id) {
                                            try {
                                                List.Controller.handleItemClick($$('menu123').getMenuItem(id));
                                            } catch(err) {}
                                        }
                                    }

The same code works for me

http://webix.com/snippet/f5bad08a

Please share the full snippet where problem can be reconstructed