krasimir/EventBus — pull request #3 by alexandernst (2013-01-31 13:04:20+00:00)
Title: Ignore missing callback and scope arguments

If we add a listener this way:

EventBus.addEventHandler("my_event", function(){});

then there is no scope and the funciton is anonymous.

If we then try to check if somebody is listening to the event "my_event"

EventBus.hasEventListener("my_event");

we'll get false (which is not true as we just created a listener for that event!)

This patch fixes that.