This is the code that fails:
Code: Select all
if (item.command) {
if (!item.eventEmitter) {
item.eventEmitter = new EventEmitter();
item.eventEmitter.subscribe(item.command);
}
item.eventEmitter.emit({
originalEvent: event,
item: item
});
}
Code: Select all
if (item.command) {
item.command({
originalEvent: event,
item: item
});
}