- fix problem where we are not notifying the listeners of events

This commit is contained in:
Richard Alam 2012-10-04 14:55:55 +00:00
parent 64724c4104
commit 0303e01828

View File

@ -69,11 +69,14 @@
* 3rd-parties. * 3rd-parties.
*/ */
function broadcast(bbbEvent) { function broadcast(bbbEvent) {
if (!listeners[bbbEvent.eventName]) if (!listeners[bbbEvent.eventName]) {
console.log("No listeners for [" + bbbEvent.eventName + "]");
return; return;
}
for (var i = 0; i < listeners[bbbEvent.eventName].length; i++) { for (var i = 0; i < listeners[bbbEvent.eventName].length; i++) {
listeners[eventName][i](bbbEvent); console.log("Notifying listeners for [" + bbbEvent.eventName + "]");
listeners[bbbEvent.eventName][i](bbbEvent);
} }
}; };
@ -94,7 +97,3 @@
window.BBB = BBB; window.BBB = BBB;
})(this); })(this);
if (typeof window.BBB_Ready === 'function')
window.BBB_Ready();