github/hubot-scripts — pull request #1010 by maxbeatty (2013-07-06 08:12:34+00:00)
Title: Fix mongo-brain error when no results cause data to be undefined

This fixes the issue @haf came across a few months ago in #873. The check on `results` was only for existence and not on length so if you didn't have any results, the brain's data was set to `undefined` which caused a crash on save.