Permalink
Browse files

don't bomb out if a name isn't set, just skip it

  • Loading branch information...
1 parent ceff5fd commit f34166ff2e87d78afdbbd5107a3ebf7022f079f6 @atmos atmos committed Dec 6, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/robot.coffee
View
@@ -200,7 +200,8 @@ class Robot
result = null
lowerName = name.toLowerCase()
for k of (@brain.data.users or { })
- if @brain.data.users[k]['name'].toLowerCase() is lowerName
+ userName = @brain.data.users[k]['name']
+ if userName? and userName.toLowerCase() is lowerName
result = @brain.data.users[k]
result

0 comments on commit f34166f

Please sign in to comment.