github/hubot — pull request #752 by conradkleinespel (2014-08-29 08:10:31+00:00)
Title: fix #619: brain loading timing issue

Following the discussion in #619, here's a fix. I've tested it with the `hubot-plusplus` module, which was my use case. It works in that case.

If there are any questions about it, please let me know :-)

### Possible BC breaks

If devs rely on there being a timing issue in the Hubot core, some scripts might break as they might do something like:

```coffee
if robot.brain.data
doStuff(robot.brain.data)
robot.brain.on 'loaded', (data) ->
doStuff(data)
```

With this fix, the `on loaded` event listener would effectively be called twice, whereas before, it would have been called only once.

/cc @technicalpickles